(branches this)
Return a seq of the child branches of this tree, or nil if it is a leaf (not a branch)
Return a seq of the child branches of this tree, or nil if it is a leaf (not a branch)
(tree this)
Return the pure treeish data structure
Return the pure treeish data structure
Perform up-and-down zip operations. Like a stack, up is guaranteed to never be called without a preceeding dn
Perform up-and-down zip operations. Like a stack, up is guaranteed to never be called without a preceeding dn
(z-dn this t)
(z-dn this t k)
Return a pair of a sequence of child branches (or a three-tuple pivoting on k) and a possibly updated Zip, or nil if t is not a branch.
Return a pair of a sequence of child branches (or a three-tuple pivoting on k) and a possibly updated Zip, or nil if t is not a branch.
(z-up this branches)
Return a pair of a new tree with with the supplied branches and a possibly updated Zip
Return a pair of a new tree with with the supplied branches and a possibly updated Zip
(change loc t)
Replace the tree at this loc with t, without moving.
Replace the tree at this loc with t, without moving.
(left loc)
Return the loc of the left sibling of the tree at this loc, or nil.
Return the loc of the left sibling of the tree at this loc, or nil.
(down loc)
Return the loc of the leftmost child of the tree at this loc, or nil if no children.
Return the loc of the leftmost child of the tree at this loc, or nil if no children.
(delete loc)
Delete the tree at loc, returning the loc that would have preceded it in a depth-first walk.
Delete the tree at loc, returning the loc that would have preceded it in a depth-first walk.
(up loc)
Return the loc of the parent of the tree at this loc (reflecting any changes), or nil if at the top.
Return the loc of the parent of the tree at this loc (reflecting any changes), or nil if at the top.
(insert-right loc t)
Insert t as the right sibling of the tree at this loc, without moving.
Insert t as the right sibling of the tree at this loc, without moving.
(insert-down loc t)
Insert t as the leftmost child of the tree (which must be a branch) at this loc, moving to the newly inserted t.
Insert t as the leftmost child of the tree (which must be a branch) at this loc, moving to the newly inserted t.
(insert-left loc t)
Insert t as the left sibling of the tree at this loc, without moving.
Insert t as the left sibling of the tree at this loc, without moving.
(right loc)
Return the loc of the right sibling of the tree at this loc, or nil.
Return the loc of the right sibling of the tree at this loc, or nil.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close