Tools for writing macros
Example:
(macrolet [(foo [form] `(~form ~form))]
(foo x))
expands to (x x)
Example:
(symbol-macrolet [def foo]
(def def def))
expands to (def def foo)
Example:
(defsymbolmacro sum-2-3 (plus 2 3))
(with-symbol-macros
(+ 1 sum-2-3))
expands to (+ 1 (plus 2 3))
like clojure.core/macroexpand-1, but handles symbol macros
like clojure.core/macroexpand, but handles symbol macros
full recursive macro expansion
For writing def-like macros. Handles optional docstrings and attribute maps for a name to be defined in a list of macro arguments.
Copyright © 2011 Rich Hickey
Licensed under the EPL. (See the file epl.html.)