\ B-tree of B-trees vandys
\ Key returns a B-tree; an empty B-tree is created on first reference
only extensions definitions
Btree -> subclass: BtBtree
BtBtree -> :method @ { key self -- bt }
key self super-> @ if exit then
Btree -> new { bt } bt key self super-> ! bt method;
BtBtree -> :method ! ( val key self -- )
1 abort" BtBtree:! not implemented" method;
BtBtree -> :method .elems ( self -- ) 0 ['] (.leaf) rot -> do method;
BtBtree -> :method in? ( key self -- ? )
super-> @ dup if nip then method;
A BtBtree is a Btree whose leaves are each Btree's
:method @ Get the Btree stored for this key; create a new one on 1st ref
:method ! Catch a direct store; I don't think this is used anywhere
:method .elems Display our contents
:method in? Tell if a given key is in this BtBtree... we can't use
inherited Btree:in? because of our @'s behavior.