Macros.  

defmacro

Available since version 1.0 (alias of clojure.bootstrap/defmacro)

MACRO (defmacro name def-arguments params body)  (defmacro name def-arguments params-w-body & more-params-w-body)

Defines a var with newly created macro set as a root binding and returns that var. Similar to defn, but will be used as a macro by the compiler when it is called.

gensym

Available since version 1.0 (alias of clojure.core/gensym)

Usage:
  • (gensym)

  • (gensym prefix-string)

Type signatures:
  • () → Symbol

  • (String+) → Symbol

Returns a new symbol with a unique name. If a prefix-string is supplied, the name is prefix-string# where # is some unique number. If prefix is not supplied, the prefix is G__.

See also: defmacro

macro?

Available since version 1.0 (view source)

not referred automatically

Usage:
  • (macro? v)

Type signature:
  • (clojure.lang.Var) → Boolean+

Returns true if var v holds a macro, otherwise returns false.

See also: defmacro

macroexpand

Available since version 1.0 (alias of clojure.core/macroexpand)

Usage:
  • (macroexpand form)

Type signature:
  • (Any) → Any

Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither macroexpand-1 nor macroexpand expand macros in subforms.

macroexpand-1

Available since version 1.0 (alias of clojure.core/macroexpand-1)

Usage:
  • (macroexpand-1 form)

Type signature:
  • (Any) → Any

If form represents a macro form, returns its expansion, else returns form.

macroexpand-all

Available since version 1.0 (view source)

Usage:
  • (macroexpand-all form)

Type signature:
  • (Any) → Any

Recursively performs all possible macroexpansions in form, including subforms.