RBTree
Red-Black Trees
RBTree
class RBTree<X, Y>(compareTo : (X, X) -> O.Order)
Create an order map from an order function for its keys.
share
func share() : Tree<X, Y>
Tree as sharable data.
Get non-OO, purely-functional representation: for drawing, pretty-printing and non-OO contexts (e.g., async args and results):
entries
func entries() : I.Iter<(X, Y)>
An iterator for the key-value entries of the map, in ascending key order.
iterator is persistent, like the tree itself
entriesRev
func entriesRev() : I.Iter<(X, Y)>
An iterator for the key-value entries of the map, in descending key order.
iterator is persistent, like the tree itself
size
func size<X, Y>(t : Tree<X, Y>) : Nat
The size of the tree as the number of key-value entries.