diff --git a/anubis_dev/library/tools/2-4tree.anubis b/anubis_dev/library/tools/2-4tree.anubis index 5afce60..7a09438 100644 --- a/anubis_dev/library/tools/2-4tree.anubis +++ b/anubis_dev/library/tools/2-4tree.anubis @@ -1,6 +1,6 @@ Author : Matthieu Herrmann Creation : 2014/04/14 - Last update : 2014/04/15 14:16 by matthieu@embryo (inserted by vim). + Last update : 2014/04/15 16:54 by matthieu@embryo (inserted by vim). ====================================================================================================================== Library import: read tools/iterators.anubis @@ -139,6 +139,9 @@ type Tree($Entry): empty(($Entry, $Entry) -> BTree24Compare compare), tree(Node($Entry) root, ($Entry, $Entry) -> BTree24Compare compare). + Construction of a new tree: +public define Tree($Entry) new_tree( ($Entry, $Entry) -> BTree24Compare compare ) = empty(compare). + This type is used as the result of an insertion: when an entry is inserted in the tree, an other can be "rejected", i.e. in a completed 4-leaf or 4-node. The rejected entry must be fused at the parent level, while "rewiding" the recursive calls. @@ -1144,7 +1147,7 @@ public define Iterator(($Key, $Value)) take_right(TreeKV($Key, $Value) tkv) = co = Testing part ======================================================================================================= ====================================================================================================================== - + read tools/basis.anubis define One printTree(Node(Int) node) = if node is { -- libgit2 0.21.4