diff options
author | colin <colin@cicadas.surf> | 2023-08-15 07:03:06 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-08-15 07:03:06 -0700 |
commit | 7b1d813fe7f020d7df52a22f3a8f288b7913dc9b (patch) | |
tree | 78da53a6a597277898ec44380a52ca821a6af4da /README.org | |
parent | c4897d65934b702d46b773cd497e865e18615afa (diff) |
Readme update, macroexpand example
Diffstat (limited to 'README.org')
-rw-r--r-- | README.org | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -58,6 +58,20 @@ This defines a calculator language that you can use like so: #+end_src +Calling our trusty ~MACROEXPAND-1~ on a ~calc~ expression shows that +it just expands out into regular lisp: + +#+begin_src lisp + +> (macroexpand-1 '(calc 4 * (2 + -4) * sin(1.5))) +(* (* 4 (+ 2 -4)) (SIN 1.5)) + +> (macroexpand-1 '(calc 4 * 2 + -4 * sin(1.5))) +(+ (* 4 2) (* -4 (SIN 1.5))) + +#+end_src + + The symbol ~calc~ also has a function docstring. If you are using [[HTTPS://slime.common-lisp.dev/][SLIME]], you can evoke ~M-x slime-documentation~ with your cursor over the ~calc~ symbol to see this: |