Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tag: tools.macro-0.…
Fetching contributors…

Cannot retrieve contributors at this time

108 lines (58 sloc) 2.711 kB

Tools for writing macros.

Releases and Dependency Information

Latest stable release: 0.1.1

Leiningen dependency information:

[org.clojure/tools.macro "0.1.1"]

Maven dependency information:


Example Usages

macrolet: local macro definitions


(macrolet [(foo [form] `(~form ~form))]
  (foo x))

expands to (x x)

symbol-macrolet: local symbol macro definitions


(symbol-macrolet [def foo]
  (def def def))

expands to (def def foo)

defsymbolmacro, with-symbol-macros: global symbol macro definitions


(defsymbolmacro sum-2-3 (plus 2 3))
  (+ 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.

Developer Information

Change Log

  • Release 0.1.1 on 2011.05.26
    • Added name-with-attributes
  • Release 0.1.0 on 2011.05.04
    • Version imported from old contrib

Copyright and License

Copyright (c) 2011 Rich Hickey. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound bythe terms of this license. You must not remove this notice, or any other, from this software.

Jump to Line
Something went wrong with that request. Please try again.