English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2002-05-12 (00:03)
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