compile/macroexpand-1

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

Behaviour: Expands to a call to the macroexpand-1 runtime function, which applies one expansion step to FORM. With one argument the namespace is (globals); with two, the given namespace. FORM is evaluated, so quote it.

Examples:

>>> (macroexpand-1 '(when a b))
(cond [a b] [else: None])
>>> (macroexpand-1 '(decorate (d1) (def foo [x] x)))
(var foo (decorate [d1] (function foo [x] x)))

See also: macroexpand, macroexpandq-1.