Liking cljdoc? Tell your friends :D

riddley.walk


macroexpandclj

(macroexpand x)
(macroexpand x special-form?)

Expands both macros and inline functions. Optionally takes a special-form? predicate which identifies first elements of expressions that shouldn't be macroexpanded, and honors local bindings.

Expands both macros and inline functions. Optionally takes a `special-form?` predicate which
identifies first elements of expressions that shouldn't be macroexpanded, and honors local
bindings.
raw docstring

macroexpand-allclj

(macroexpand-all x)

Recursively macroexpands all forms, preserving the &env special variables.

Recursively macroexpands all forms, preserving the &env special variables.
raw docstring

walk-exprsclj

(walk-exprs predicate handler x)
(walk-exprs predicate handler special-form? x)

A walk function which only traverses valid Clojure expressions. The predicate describes whether the sub-form should be transformed. If it returns true, handler is invoked, and returns a transformed form.

Unlike clojure.walk, if the handler is called, the rest of the sub-form is not walked. The handler function is responsible for recursively calling walk-exprs on the form it is given.

Macroexpansion can be halted by defining a set of special-form? which will be left alone. Including fn, let, or other binding forms can break local variable analysis, so use with caution.

A walk function which only traverses valid Clojure expressions.  The `predicate` describes
whether the sub-form should be transformed.  If it returns true, `handler` is invoked, and
returns a transformed form.

Unlike `clojure.walk`, if the handler is called, the rest of the sub-form is not walked.
The handler function is responsible for recursively calling `walk-exprs` on the form it is
given.

Macroexpansion can be halted by defining a set of `special-form?` which will be left alone.
Including `fn`, `let`, or other binding forms can break local variable analysis, so use
with caution.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close