A functional key,value store that works on anything.

This works using a binary search tree. In the first version, it's a very naive algorithm, but it will probably be updated to be a red-black tree or something else.

This is copied and modified from treemap right now. It's missing a lot of features.

Type Treemap

type Treemap<K, V> = @TreeNode<K, V>

Enum TreeNode

Variants

Function find

fn find<K: Eq Ord, V: Copy>(m: Treemap<K, V>, k: K) -> Option<V>

Find a value based on the key

Function init

fn init<K, V>() -> Treemap<K, V>

Create a treemap

Function insert

fn insert<K: Copy Eq Ord, V: Copy>(m: Treemap<K, V>, k: K, v: V) ->
   Treemap<K, V>

Insert a value into the map

Function traverse

fn traverse<K, V: Copy>(m: Treemap<K, V>, f: fn&(& K, & V))

Visit all pairs in the map in order.