Liking cljdoc? Tell your friends :D

com.xadecimal.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.
sourceraw docstring

macroexpand-allclj

(macroexpand-all x)

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

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

special-form?clj

(special-form? x)

Given sym, a symbol produced by walk-exprs, returns true if sym is a special form.

Given sym, a symbol produced by walk-exprs, returns true if sym is a special form.
sourceraw docstring

walk-exprsclj

(walk-exprs predicate handler x)
(walk-exprs predicate handler special-form? x & {:keys [try-clause?]})

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.

The :try-clause? option indicates that a try clause is being walked. The special forms catch and finally are only special in try clauses.

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.

The :try-clause? option indicates that a `try` clause is being walked. The special forms
`catch` and `finally` are only special in `try` clauses.
sourceraw docstring

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

× close