Skip to main content

clojure.zip

A

  • append-child

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

B

  • branch?

    Returns true if the node at loc is a branch

C

  • children

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

D

  • down

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

E

  • edit

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

  • end?

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

I

  • insert-child

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

  • insert-left

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

  • insert-right

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

L

  • left

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

  • leftmost

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

  • lefts

    Returns a seq of the left siblings of this loc

M

  • make-node

    Returns a new branch node, given an existing node and new children. The loc is only used to supply the constructor.

N

  • next

    Moves to the next loc in the hierarchy, depth-first. When reaching the end, returns a distinguished loc detectable via e...

  • node

    Returns the node at loc

P

  • path

    Returns a seq of nodes leading to this loc

  • prev

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

R

  • remove

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

  • replace

    Replaces the node at this loc, without moving

  • right

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

  • rightmost

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

  • rights

    Returns a seq of the right siblings of this loc

  • root

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

S

  • seq-zip

    Returns a zipper for nested sequences, given a root sequence

U

  • up

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

V

  • vector-zip

    Returns a zipper for nested vectors, given a root vector

X

  • xml-zip

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

Z

  • zipper

    Creates a new zipper structure. branch? is a fn that, given a node, returns true if can have children, even if it curr...