aerial.utils.ds.trees

Tree branch/node oriented wrapper for zippers.

*default-tree-kind*

dynamic

Default kind of tree rep - :vec, :list, or :map

add-children

(add-children loc & children)

filter-children

(filter-children node f)

loc-type

(loc-type loc)
Return the type of the tree location (zipper branch) loc.  This
will be one of the extent zipper types (from zip/zipper) available.
In practice, it is going to be a vector, seq, or map.

loc?

(loc? x)
Return whether x is a valid tree location (aka zipper branch)

map-branch?

(map-branch? x)
Predicate defining what constitutes a map branch for map zippers

map-zip

(map-zip root)
Define a map zipper.  Returns a zipper for nested maps, given a
starting/root map

nest-item

(nest-item loc x valuefn)

nest-items

(nest-items loc nodes valuefn)

new-loc

(new-loc kind)(new-loc kind val)(new-loc kind val valuefn)
Return an empty location of type kind an element of
#{:vec :map :list}

tree-branch

(tree-branch x y z & more)(tree-branch x y)(tree-branch x)

tree-dispatch-fn

(tree-dispatch-fn x)

tree-edit

(tree-edit loc matchfn editfn & {all :all, zip :zip, :or {all false, zip true}})

tree-find

(tree-find loc matchfn & {all :all, :or {all false}})

tree-node

(tree-node x y z & more)(tree-node x y)(tree-node x)

tree-remove

(tree-remove loc matchfn & {all :all, zip :zip, :or {all false, zip true}})

tree-transact

(tree-transact tree zipfn & opers)