rewrite-clj.custom-zipper.core

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

append-child

(append-child G__1716 G__1717)

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

branch?

(branch? G__1659)

Returns true if the node at loc is a branch

children

(children G__1662)

Returns a seq of the children of node at loc, which must be a branch

down

(down G__1672)

Returns the loc of the leftmost child of the node at this loc, or nil if no children

edit

(edit loc f & args)

Replaces the node at this loc with the value of (f node args)

end?

(end? G__1731)

Returns true if loc represents the end of a depth-first walk

insert-child

(insert-child G__1713 G__1714)

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

insert-left

(insert-left G__1701 G__1702)

Inserts the item as the left sibling of the node at this loc, without moving

insert-right

(insert-right G__1705 G__1706)

Inserts the item as the right sibling of the node at this loc, without moving

left

(left G__1691)

Returns the loc of the left sibling of the node at this loc, or nil

leftmost

(leftmost G__1696)

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

lefts

(lefts G__1670)

Returns a seq of the left siblings of this loc

next

(next G__1719)

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.

node

(node G__1656)

Returns the node at loc

position

(position loc)

Returns the ones-based [row col] of the start of the current node

prev

(prev G__1726)

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

remove

(remove G__1733)

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

replace

(replace G__1709 G__1710)

Replaces the node at this loc, without moving

right

(right G__1683)

Returns the loc of the right sibling of the node at this loc, or nil

rightmost

(rightmost G__1688)

Returns the loc of the rightmost sibling of the node at this loc, or self

root

(root G__1680)

zips all the way up and returns the root node, reflecting any changes.

up

(up G__1677)

Returns the loc of the parent of the node at this loc, or nil if at the top