(add-child new-node parent-node nodes)
Add a new-node to the nodes as the rightmost child of the parent-node
Add a new-node to the nodes as the rightmost child of the parent-node
(add-left-sibling new-node focus-node nodes)
Add a new-node to the nodes as a left sibling of the focus-node
Add a new-node to the nodes as a left sibling of the focus-node
(add-right-sibling new-node focus-node nodes)
Add a new-node to the nodes as a right sibling of the focus-node
Add a new-node to the nodes as a right sibling of the focus-node
(adjacency-list->vec-tree id-key parent-id-key nodes & [opts])
Make a vector that represents a tree which enable to be a zipper using vector-zip nodes must represent adjacency list
id-key - a keyword that represents id of a node parent-id-key - a keyword that represents parent id of a node
This can take a options. :make-node - a function that, given a node, returns a vector which represents a node of a tree default: clojure.core/vector in clj or cljs.core/vector in cljs
Make a vector that represents a tree which enable to be a zipper using vector-zip nodes must represent adjacency list id-key - a keyword that represents id of a node parent-id-key - a keyword that represents parent id of a node This can take a options. :make-node - a function that, given a node, returns a vector which represents a node of a tree default: clojure.core/vector in clj or cljs.core/vector in cljs
(ancestor? n1 n2)
true if n1 is a ancestor of n2
true if n1 is a ancestor of n2
(descendant? n1 n2)
true if n1 is a descendant of n2
true if n1 is a descendant of n2
(leaf? {:keys [lft rgt]})
true if the node is a leaf node
true if the node is a leaf node
(nested-sets->vec-tree nodes & [opts])
Make a vector that represents a tree which enable to be a zipper using vector-zip nodes must represent nested sets
This can take a options. :make-node - a function that, given a node, returns a vector which represents a node of a tree default: clojure.core/vector in clj or cljs.core/vector in cljs
Make a vector that represents a tree which enable to be a zipper using vector-zip nodes must represent nested sets This can take a options. :make-node - a function that, given a node, returns a vector which represents a node of a tree default: clojure.core/vector in clj or cljs.core/vector in cljs
(remove-subtree node nodes)
Remove the node and nodes that are under the node
Remove the node and nodes that are under the node
(root? {:keys [lft]})
true if the node is the root node
true if the node is the root node
(sort-nested-sets nodes)
sort as nested sets model
sort as nested sets model
(vec-tree->nested-sets vec-tree)
Make a nested sets as a vector from a vector tree which may be made from nested-sets->vec-tree above
Make a nested sets as a vector from a vector tree which may be made from nested-sets->vec-tree above
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close