compile/macroexpand

Syntax: (macroexpand FORM), (macroexpand FORM NS)

Behaviour: Expands to a call to the macroexpand runtime function, which expands FORM until its head is no longer a macro. With one argument the namespace is (globals); with two, the given namespace. FORM is evaluated, so quote it.

Examples:

>>> (macroexpand '(when ready (print "go")))
(cond [ready (print "go")] [else: None])

See also: macroexpand-1 for one step, macroexpandq to skip the quote.

Also: function macroexpand-1, macroexpand.