Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Set
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: james woodyatt <jhw@w...>
Subject: Re: [Caml-list] Set
On 02 May 2004, at 01:51, Jon Harrop wrote:
>
> When the docs for Set say that it presents elements in an 
> "unspecified" order
> to "fold" does it, in fact, always present them in increasing order?

A note: modules produced by the [Cf_rbtree.Set(E)] functor in my 
recently released Cf library deliberately presents elements in an 
indeterminate order, so as to minimize the amount of tree rotations 
required for set operations constructed from [fold] and [filter].

If you want the elements in increasing or decreasing order, the 
functions you want are [to_seq_incr] and [to_seq_decr] (or possibly 
[to_list_incr] and [to_list_decr] if you know you're going to want all 
of them).


-- 
j h woodyatt <jhw@wetware.com>
that's my village calling... no doubt, they want their idiot back.

-------------------
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