Liking cljdoc? Tell your friends :D

tinsel.zip

Zipper support for tinsel.

Zipper support for tinsel.
raw docstring

do-treeclj

(do-tree do-fn start-loc)
(do-tree do-fn start-loc next-fn)

Applies the first argument to the nodes of the tree, moving to the next node by moving to the result of the next-fn argument applied to the current node until the end is reached. By default, the next-fn argument is zip/next. Not lazy, so do-fn can have side-effects.

Applies the first argument to the nodes of the tree, moving to the next
node by moving to the result of the next-fn argument applied to the current
node until the end is reached. By default, the next-fn argument is
zip/next. Not lazy, so do-fn can have side-effects.
raw docstring

hiccup-zipclj

(hiccup-zip root)

Returns a zipper for Hiccup forms, given a root form.

Returns a zipper for Hiccup forms, given a root form.
raw docstring

leftmost-descendantclj

(leftmost-descendant loc)

Given a zipper loc, returns its leftmost descendent (ie, down repeatedly).

Given a zipper loc, returns its leftmost descendent (ie, down repeatedly).
raw docstring

postorder-firstclj

(postorder-first loc)

Given a root node, returns the first node of a postorder tree walk. See comment on postorder-next.

Given a root node, returns the first node of a postorder tree walk. See
comment on postorder-next.
raw docstring

postorder-nextclj

(postorder-next loc)

Moves to the next loc in the hierarchy in postorder traversal. Behaves like clojure.zip/next otherwise. Note that unlike with a pre-order walk, the root is NOT the first element in the walk order, so be sure to take that into account in your algorithm if it matters (ie, call postorder-first first thing before processing a node).

Moves to the next loc in the hierarchy in postorder traversal. Behaves like
clojure.zip/next otherwise. Note that unlike with a pre-order walk, the root
is NOT the first element in the walk order, so be sure to take that into
account in your algorithm if it matters (ie, call postorder-first first
thing before processing a node).
raw docstring

(print-tree start-loc)
(print-tree start-loc next-fn)

Prints the nodes of the tree by repeatedly applying the argument function to the location until the end is reached. By default, the next-fn argument is zip/next.

Prints the nodes of the tree by repeatedly applying the argument
function to the location until the end is reached. By default, the
next-fn argument is zip/next.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close