Skip to content

Instantly share code, notes, and snippets.

@GoNZooo
Created May 22, 2015 23:14
Show Gist options
  • Save GoNZooo/aea1b0946521f5aac247 to your computer and use it in GitHub Desktop.
Save GoNZooo/aea1b0946521f5aac247 to your computer and use it in GitHub Desktop.
Gist for illustrating how simple `defmacro` is
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