Created
May 22, 2015 23:14
-
-
Save GoNZooo/aea1b0946521f5aac247 to your computer and use it in GitHub Desktop.
Gist for illustrating how simple `defmacro` is
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (defmacro reverse-macro | |
[input-syntax] | |
(reverse input-syntax)) | |
#'user/reverse-macro | |
user=> (reverse-macro (5 4 3 2 1 +)) | |
15 | |
user=> (macroexpand '(reverse-macro (5 4 3 2 1 +))) | |
(+ 1 2 3 4 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment