Liking cljdoc? Tell your friends :D

clj-tree-zipper.core


*root*clj

source

add-at-pathclj

(add-at-path tree dir-path element)

dir-path : '( '/' <elem str> <elem str> ....) returns nil if not possible to add, meaning intermediate path elem missing returns a new tree if addition was made returns the original tree if the path already exists

dir-path : '( '/' <elem str> <elem str> ....)
returns nil if not possible to add, meaning intermediate path elem missing
returns a new tree if addition was made
returns the original tree if the path already exists
sourceraw docstring

find-pathclj

(find-path tree path)

path is a list of the form '('/' 'tmp' 'sub'), would find '/tmp/sub'

path is a list of the form '('/' 'tmp' 'sub'), would find '/tmp/sub'
sourceraw docstring

path-upclj

(path-up tree)

Returns a list, reverse of which can be used to find the current node from root

Returns a list, reverse of which can be used to find the current node from root
sourceraw docstring

remove-pathclj

(remove-path tree path)

returns nil if unable to remove (can't remove root, path does not exists) returns new tree if removal worked

returns nil if unable to remove (can't remove root, path does not exists)
returns new tree if removal worked
sourceraw docstring

tree-zipclj

(tree-zip root)

Make a zipper out of a tree.

Make a zipper out of a tree.
sourceraw docstring

ZipTreecljprotocol

branch?clj

(branch? node)

Is it possible for node to have children?

Is it possible for node to have children?

make-nodeclj

(make-node node children)

Makes new node from existing node and children.

Makes new node from existing node and children.

node-childrenclj

(node-children node)

Return children of this node.

Return children of this node.
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close