An n-ary tree by any other name…
A rose tree is an n-ary tree in which each node has zero or more children, all of which are themselves rose trees.
Up-to-date documentation can be found on hex.
RoseTree.new/0
RoseTree.new/1
RoseTree.new/2
RoseTree.from_map/1
RoseTree.add_child/2
RoseTree.add_child/2
RoseTree.pop_child/1
RoseTree.pop_child_at/2
RoseTree.elem_at/2
RoseTree.map/2
RoseTree.update_node/3
RoseTree.update_children/3
RoseTree.merge_nodes/2
RoseTree.to_list/1
RoseTree.paths/1
RoseTree.child_values/1
RoseTree.is_child?/2
RoseTree.Zipper.to_tree/1
RoseTree.Zipper.from_tree/1
RoseTree.Zipper.nth_child/2
RoseTree.Zipper.ascend/1
RoseTree.Zipper.to_root/1
RoseTree.Zipper.next_sibling/1
RoseTree.Zipper.previous_sibling/1
RoseTree.Zipper.last_child/1
RoseTree.Zipper.first_child/1
RoseTree.Zipper.find_child/2
RoseTree.Zipper.prune/1
RoseTree.Zipper.modify/2
RoseTree.Zipper.lift/2
RoseTree.Zipper.insert_left/2
RoseTree.Zipper.insert_right/2
RoseTree.Zipper.insert_first_child/2
RoseTree.Zipper.insert_last_child/2
RoseTree.Zipper.insert_nth_child/3
RoseTree.Zipper.root?/1
RoseTree.Zipper.leaf?/1
RoseTree.Zipper.first?/1
RoseTree.Zipper.last?/1
RoseTree.Zipper.only_child?/1
RoseTree.Zipper.has_parent?/1
RoseTree.Zipper.has_children?/1
RoseTree
implements the Enumerable protocol, so all applicable Enum and Stream functions are usable with a RoseTree
.
Add rose_tree
to your list of dependencies in mix.exs
:
def deps do
[{:rose_tree, "~> 0.2.0"}]
end