A 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.

Type treemap

type treemap<K, V> = @mut tree_edge<K, V>

Function find

fn find<K: copy, V: copy>(m: &const tree_edge<K, V>, k: K) -> option<V>

Find a value based on the key

Function insert

fn insert<K: copy, V: copy>(m: &mut tree_edge<K, V>, k: K, v: V)

Insert a value into the map

Function traverse

fn traverse<K, V: copy>(m: &const tree_edge<K, V>, f: fn(K, V))

Visit all pairs in the map in order.

Function treemap

fn treemap<K, V>() -> treemap<K, V>

Create a treemap