From 7b1d813fe7f020d7df52a22f3a8f288b7913dc9b Mon Sep 17 00:00:00 2001 From: colin Date: Tue, 15 Aug 2023 07:03:06 -0700 Subject: Readme update, macroexpand example --- README.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.org b/README.org index 0b08ad0..1c41957 100644 --- a/README.org +++ b/README.org @@ -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: -- cgit v1.2.3