Build an ordered Radix tree.
Extract the Tree from the RadixTree. The Tree is from the package Tree
that has a very nice API for working with trees, and allows converting the Tree
to a Zipper - making traversals easier.
Create an empty Radix tree.
import Tree
RadixTree.empty
|> RadixTree.toTree
|> Tree.label --> []Create an Radix tree with a single value.
import Tree
RadixTree.singleton [1, 2, 3]
|> RadixTree.toTree
|> Tree.label --> [1, 2, 3]An Ordered insert of a value to the Radix tree.
import Tree
RadixTree.singleton [1, 2, 3]
|> RadixTree.insert [1, 2, 4]
|> RadixTree.toTree
|> Tree.label --> [1, 2]
RadixTree.singleton [1, 2, 3]
|> RadixTree.insert [1, 2, 4]
|> RadixTree.toTree
|> Tree.children --> [Tree.singleton [4], Tree.singleton [3]]
Represents an ordered Radix tree.