caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Map.iter unspecified order of visiting -- reason?
@ 2003-11-18  8:49 Benedikt Grundmann
  0 siblings, 0 replies; only message in thread
From: Benedikt Grundmann @ 2003-11-18  8:49 UTC (permalink / raw)
  To: caml-list

To cite the manual of Map:
val iter : (key -> 'a -> unit) -> 'a t -> unit
 iter f m applies f to all bindings in map m. f receives the key as first 
argument, and the associated value as second argument. The order in which the 
bindings are passed to f is unspecified. 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Any special reason to do so?  I mean the source code actually implements
ordered visiting and it is indeed one of the great advantages of using a Map
instead of a Hashtbl (the other it being sideeffect free).  So why not 
document / require it to visit the keys in an well defined order with regard
to the ordering function?  

Cheers,

Bene

-------------------
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] only message in thread

only message in thread, other threads:[~2003-11-18  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-18  8:49 [Caml-list] Map.iter unspecified order of visiting -- reason? Benedikt Grundmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).