Liking cljdoc? Tell your friends :D

com.hapgood.zipii

Functions for navigating and editing of tree-like data structures using a zipper This namespace attempts to duplicate the functionality of clojure.zip.

Functions for navigating and editing of tree-like data structures using a zipper
This namespace attempts to duplicate the functionality of clojure.zip.
raw docstring

->meclj/s

(->me pr)
source

append-childclj/s

Insert the item as the rightmost child of the node at this loc, without moving

Insert the item as the rightmost child of the node at this loc, without moving
sourceraw docstring

append-downclj/s

(append-down loc tree)

Inserts the item as the rightmost child of the tree at this loc

Inserts the item as the rightmost child of the tree at this loc
sourceraw docstring

branch?clj/s

(branch? loc)
source

changeclj/s

source

childrenclj/s

(children loc)
source

coll-zipclj/s

Return a zipper for nested collections, given a root collection

Return a zipper for nested collections, given a root collection
sourceraw docstring

CollZipclj/s

source

deleteclj/s

source

depthclj/s

(depth loc)
source

downclj/s

source

editclj/s

(edit loc f & args)

Replace the tree at this loc with the value of (f tree args)

Replace the tree at this loc with the value of (f tree args)
sourceraw docstring

end?clj/s

Return wormholed loc if loc represents the end of a depth-first walk, otherwise nil

Return wormholed loc if loc represents the end of a depth-first walk, otherwise nil
sourceraw docstring

GeneralZipclj/s

source

insert-childclj/s

Insert the item as the leftmost child of the node at this loc, without moving

Insert the item as the leftmost child of the node at this loc, without moving
sourceraw docstring

insert-downclj/s

source

insert-leftclj/s

source

insert-rightclj/s

source

leftclj/s

source

leftmostclj/s

(leftmost loc)

Returns the loc of the leftmost sibling of the tree at this loc, or self

Returns the loc of the leftmost sibling of the tree at this loc, or self
sourceraw docstring

list-zipclj/s

Return a zipper for nested lists, given a root list

Return a zipper for nested lists, given a root list
sourceraw docstring

ListZipclj/s

source

map-zipclj/s

(map-zip root-children)
(map-zip root-key root-children)

Return a zipper for nested maps, given a root map of children

Return a zipper for nested maps, given a root map of children
sourceraw docstring

map-zip*clj/s

Return a zipper for nested map entries, given a root map entry

Return a zipper for nested map entries, given a root map entry
sourceraw docstring

MapZipclj/s

source

nextclj/s

(next loc)

Moves to the next loc in the hierarchy, depth-first. When reaching the end, returns a distinguished loc detectable via end?. If already at the end, stays there.

Moves to the next loc in the hierarchy, depth-first. When reaching the end, returns
a distinguished loc detectable via end?.  If already at the end, stays there.
sourceraw docstring

nodeclj/s

source

nth-childclj/s

source

pathclj/s

(path loc)

Return a seq of trees leading to this loc

Return a seq of trees leading to this loc
sourceraw docstring

prevclj/s

(prev loc)

Moves to the previous loc in the hierarchy, depth-first. If already at the root, returns nil.

Moves to the previous loc in the hierarchy, depth-first. If already at the root, returns nil.
sourceraw docstring

removeclj/s

(remove loc)

Remove the node at loc, returning the loc that would have preceded it in a depth-first walk.

Remove the node at loc, returning the loc that would have preceded it in a depth-first walk.
sourceraw docstring

replaceclj/s

Replaces the node at this loc, without moving

Replaces the node at this loc, without moving
sourceraw docstring

source

rightmostclj/s

(rightmost loc)

Returns the loc of the leftmost sibling of the tree at this loc, or self

Returns the loc of the leftmost sibling of the tree at this loc, or self
sourceraw docstring

rootclj/s

(root loc)

Zip all the way up and return the root, reflecting any changes.

Zip all the way up and return the root, reflecting any changes.
sourceraw docstring

seq-zipclj/s

Return a zipper for nested seqs, given a root seq

Return a zipper for nested seqs, given a root seq
sourceraw docstring

seqable-zipclj/s

Return a zipper for nested seqables, given a root seqable

Return a zipper for nested seqables, given a root seqable
sourceraw docstring

SeqableZipclj/s

source

SeqZipclj/s

source

upclj/s

source

vector-zipclj/s

Return a zipper for nested vectors, given a root vector

Return a zipper for nested vectors, given a root vector
sourceraw docstring

VectorZipclj/s

source

xml-zipclj/s

Return a zipper for xml elements (as from xml/parse), given a root element

Return a zipper for xml elements (as from xml/parse), given a root element
sourceraw docstring

XMLZipclj/s

source

zipperclj/s

(zipper branch? children make-node root)

Creates a new zipper structure. Note that zippers created using this function are not serializable.

branch? is a predicate fn that returns true if the given (sub)tree can have child branches.

children is a fn that, given a (sub)tree, returns a possibly empty sequence of its subtrees, or nil if it is not a branch.

make-node is a constructor fn that, given a (sub)tree and a seq of branches, returns a new (sub)tree having the supplied child branches.

root is the root of the tree.

Creates a new zipper structure.  Note that zippers created using this function are not serializable.

`branch?` is a predicate fn that returns true if the given (sub)tree can have child branches.

`children` is a fn that, given a (sub)tree, returns a possibly empty sequence of its subtrees, or nil if it is not a branch.

`make-node` is a constructor fn that, given a (sub)tree and a seq of branches, returns a new (sub)tree having the supplied child branches.

`root` is the root of the tree.
sourceraw docstring

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

× close