English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    
Browse thread
[Caml-list] Suggestion about balanced trees in stdlib
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: polux moon <polux.moon@w...>
Subject: Re: [Caml-list] Suggestion about balanced trees in stdlib
In a tree, there are many leaf 
> type set = Empty | Node of set * elt * set * int
Why not add   Leaf of elt 
Instead of using Node(Empty,some value,Empty,0) u can use Leaf(some value).
It is clear and just add some code.
U win 3 word per leaf. (in a tree the leaf are about the half of the nodes)

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners