clojure.zip

(source)
Functional hierarchical zipper, with navigation, editing, and enumeration. See Huet

For more info about this library see:

https://clojuredocs.org/clojure.core
Public Variable Short Description
append-child (clj) Inserts the item as the rightmost child of the node at this loc, without moving.
branch? (clj) Returns true if the node at loc is a branch.
children (clj) Returns a seq of the children of node at loc, which must be a branch.
down (clj) Returns the loc of the leftmost child of the node at this loc, or nil if no children.
edit (clj) Replaces the node at this loc with the value of (f node args).
end? (clj) Returns true if loc represents the end of a depth-first walk.
insert-child (clj) Inserts the item as the leftmost child of the node at this loc, without moving.
insert-left (clj) Inserts the item as the left sibling of the node at this loc, without moving.
insert-right (clj) Inserts the item as the right sibling of the node at this loc, without moving.
left (clj) Returns the loc of the left sibling of the node at this loc, or nil.
leftmost (clj) Returns the loc of the leftmost sibling of the node at this loc, or self.
lefts (clj) Returns a seq of the left siblings of this loc.
make-node (clj) Returns a new branch node, given an existing node and new children.
next (clj) Moves to the next loc in the hierarchy, depth-first.
node (clj) Returns the node at loc.
path (clj) Returns a seq of nodes leading to this loc.
prev (clj) Moves to the previous loc in the hierarchy, depth-first.
remove (clj) Removes the node at loc, returning the loc that would have preceded it in a depth-first walk.
replace (clj) Replaces the node at this loc, without moving.
right (clj) Returns the loc of the right sibling of the node at this loc, or nil.
rightmost (clj) Returns the loc of the rightmost sibling of the node at this loc, or self.
rights (clj) Returns a seq of the right siblings of this loc.
root (clj) zips all the way up and returns the root node, reflecting any changes.
seq-zip (clj) Returns a zipper for nested sequences, given a root sequence.
up (clj) Returns the loc of the parent of the node at this loc, or nil if at the top.
vector-zip (clj) Returns a zipper for nested vectors, given a root vector.
xml-zip (clj) Returns a zipper for xml elements (as from xml/parse), given a root element.
zipper (clj) Creates a new zipper structure.