Liking cljdoc? Tell your friends :D

com.hapgood.zipper


nth-childclj/s

(nth-child loc n)
source

Treeishclj/sprotocol

branchesclj/s

(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)

treeclj/s

(tree this)

Return the pure treeish data structure

Return the pure treeish data structure
source

Zipclj/sprotocol

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-dnclj/s

(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-upclj/s

(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
sourceraw docstring

Zipperclj/sprotocol

changeclj/s

(change loc t)

Replace the tree at this loc with t, without moving.

Replace the tree at this loc with t, without moving.

leftclj/s

(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.

downclj/s

(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.

deleteclj/s

(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.

upclj/s

(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-rightclj/s

(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-downclj/s

(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-leftclj/s

(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.

rightclj/s

(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.
source

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

× close