Liking cljdoc? Tell your friends :D

nested-sets.core


add-childclj/s

(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
sourceraw docstring

add-left-siblingclj/s

(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
sourceraw docstring

add-right-siblingclj/s

(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
sourceraw docstring

adjacency-list->vec-treeclj/s

(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
sourceraw docstring

ancestor?clj/s

(ancestor? n1 n2)

true if n1 is a ancestor of n2

true if n1 is a ancestor of n2
sourceraw docstring

descendant?clj/s

(descendant? n1 n2)

true if n1 is a descendant of n2

true if n1 is a descendant of n2
sourceraw docstring

leaf?clj/s

(leaf? {:keys [lft rgt]})

true if the node is a leaf node

true if the node is a leaf node
sourceraw docstring

nested-sets->vec-treeclj/s

(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
sourceraw docstring

remove-subtreeclj/s

(remove-subtree node nodes)

Remove the node and nodes that are under the node

Remove the node and nodes that are under the node
sourceraw docstring

root?clj/s

(root? {:keys [lft]})

true if the node is the root node

true if the node is the root node
sourceraw docstring

sort-nested-setsclj/s

(sort-nested-sets nodes)

sort as nested sets model

sort as nested sets model
sourceraw docstring

vec-tree->nested-setsclj/s

(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
sourceraw docstring

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

× close