Sure, here are the relevant bits:
type
BBTree*[K,V] = ref object # BBTree is a generic type with keys and
values of types K, V
## `BBTree` is an opaque immutable type.
left: BBTree[K,V] # left subtree; may be nil
right: BBTree[K,V] # right subtree; may be nil
size: int # the size of the (sub-)tree rooted in this
node
key: K # the search key; must suppprt the generic
``cmp`` proc
val: V # the data value associated with the key,
and stored in a node
Run
func isSubset*[K,U,V](tree1: BBTree[K,U], tree2: BBTree[K,V]): bool =
Run
You can find the complete repo at
[github](https://github.com/dcurrie/nim-bbtree)