Public Variables and Functions
append-child
functionUsage: (append-child loc item)
Inserts the item as the rightmost child of the node at this loc,without moving
Added in Clojure version 1.0
Source
branch?
functionUsage: (branch? loc)
Returns true if the node at loc is a branch
Added in Clojure version 1.0
Source
children
functionUsage: (children loc)
Returns a seq of the children of node at loc, which must be a branch
Added in Clojure version 1.0
Source
down
functionUsage: (down loc)
Returns the loc of the leftmost child of the node at this loc, ornil if no children
Added in Clojure version 1.0
Source
edit
functionUsage: (edit loc f & args)
Replaces the node at this loc with the value of (f node args)
Added in Clojure version 1.0
Source
end?
functionUsage: (end? loc)
Returns true if loc represents the end of a depth-first walk
Added in Clojure version 1.0
Source
insert-child
functionUsage: (insert-child loc item)
Inserts the item as the leftmost child of the node at this loc,without moving
Added in Clojure version 1.0
Source
insert-left
functionUsage: (insert-left loc item)
Inserts the item as the left sibling of the node at this loc,without moving
Added in Clojure version 1.0
Source
insert-right
functionUsage: (insert-right loc item)
Inserts the item as the right sibling of the node at this loc,without moving
Added in Clojure version 1.0
Source
left
functionUsage: (left loc)
Returns the loc of the left sibling of the node at this loc, or nil
Added in Clojure version 1.0
Source
leftmost
functionUsage: (leftmost loc)
Returns the loc of the leftmost sibling of the node at this loc, or self
Added in Clojure version 1.0
Source
lefts
functionUsage: (lefts loc)
Returns a seq of the left siblings of this loc
Added in Clojure version 1.0
Source
make-node
functionUsage: (make-node loc node children)
Returns a new branch node, given an existing node and newchildren. The loc is only used to supply the constructor.
Added in Clojure version 1.0
Source
next
functionUsage: (next loc)
Moves to the next loc in the hierarchy, depth-first. When reachingthe end, returns a distinguished loc detectable via end?. If alreadyat the end, stays there.
Added in Clojure version 1.0
Source
node
functionUsage: (node loc)
Returns the node at loc
Added in Clojure version 1.0
Source
path
functionUsage: (path loc)
Returns a seq of nodes leading to this loc
Added in Clojure version 1.0
Source
prev
functionUsage: (prev loc)
Moves to the previous loc in the hierarchy, depth-first. If alreadyat the root, returns nil.
Added in Clojure version 1.0
Source
remove
functionUsage: (remove loc)
Removes the node at loc, returning the loc that would have precededit in a depth-first walk.
Added in Clojure version 1.0
Source
replace
functionUsage: (replace loc node)
Replaces the node at this loc, without moving
Added in Clojure version 1.0
Source
right
functionUsage: (right loc)
Returns the loc of the right sibling of the node at this loc, or nil
Added in Clojure version 1.0
Source
rightmost
functionUsage: (rightmost loc)
Returns the loc of the rightmost sibling of the node at this loc, or self
Added in Clojure version 1.0
Source
rights
functionUsage: (rights loc)
Returns a seq of the right siblings of this loc
Added in Clojure version 1.0
Source
root
functionUsage: (root loc)
zips all the way up and returns the root node, reflecting anychanges.
Added in Clojure version 1.0
Source
seq-zip
functionUsage: (seq-zip root)
Returns a zipper for nested sequences, given a root sequence
Added in Clojure version 1.0
Source
up
functionUsage: (up loc)
Returns the loc of the parent of the node at this loc, or nil if atthe top
Added in Clojure version 1.0
Source
vector-zip
functionUsage: (vector-zip root)
Returns a zipper for nested vectors, given a root vector
Added in Clojure version 1.0
Source
xml-zip
functionUsage: (xml-zip root)
Returns a zipper for xml elements (as from xml/parse),given a root element
Added in Clojure version 1.0
Source
zipper
functionUsage: (zipper branch? children make-node root)
Creates a new zipper structure. branch? is a fn that, given a node, returns true if can havechildren, even if it currently doesn't.children is a fn that, given a branch node, returns a seq of itschildren.make-node is a fn that, given an existing node and a seq ofchildren, returns a new branch node with the supplied children.root is the root node.
Added in Clojure version 1.0
Source