* [Caml-list] Set
@ 2004-05-02 8:51 Jon Harrop
2004-05-02 10:23 ` Martin Jambon
2004-05-02 16:57 ` james woodyatt
0 siblings, 2 replies; 3+ messages in thread
From: Jon Harrop @ 2004-05-02 8:51 UTC (permalink / raw)
To: caml-list
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?
Cheers,
Jon.
-------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Set
2004-05-02 8:51 [Caml-list] Set Jon Harrop
@ 2004-05-02 10:23 ` Martin Jambon
2004-05-02 16:57 ` james woodyatt
1 sibling, 0 replies; 3+ messages in thread
From: Martin Jambon @ 2004-05-02 10:23 UTC (permalink / raw)
To: Jon Harrop; +Cc: caml-list
On Sun, 2 May 2004, 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?
According to the implementation, yes (in fact in decreasing order), but
this does not seem to part of the standard.
Martin
-------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Set
2004-05-02 8:51 [Caml-list] Set Jon Harrop
2004-05-02 10:23 ` Martin Jambon
@ 2004-05-02 16:57 ` james woodyatt
1 sibling, 0 replies; 3+ messages in thread
From: james woodyatt @ 2004-05-02 16:57 UTC (permalink / raw)
To: Jon Harrop; +Cc: caml-list
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-02 16:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-02 8:51 [Caml-list] Set Jon Harrop
2004-05-02 10:23 ` Martin Jambon
2004-05-02 16:57 ` james woodyatt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox