From 6bff2966c51f9f484cdc95721cff639c4f8be42a Mon Sep 17 00:00:00 2001 From: Jan Triska Date: Sun, 26 Nov 2017 10:00:24 +0100 Subject: [PATCH] Added macrolet statement to README --- README.markdown | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.markdown b/README.markdown index 5765cd8..f655afe 100644 --- a/README.markdown +++ b/README.markdown @@ -270,6 +270,26 @@ Compiled: return 1.0; } +### MACROLET statement + + MACROLET ({(name lambda-list local-form*)}*) statement* + +`macrolet` establishes local macro definitions, using the same format as `defkernelmacro`, and executes a series of `statement`s with these definition bindings. + +Example: + + (macrolet ((square (a) + (if (numberp a) + (* a a) + `(* ,a ,a)))) + (return (square 2))) + +Compiled: + + { + return 4; + } + ### DO statement DO ({(var init-form step-form)}*) (test-form) statement*