Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-05-02 (16:57)
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 <>
that's my village calling... no doubt, they want their idiot back.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: