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] Map.iter unspecified order of visiting -- reason?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Benedikt Grundmann <Benedikt-Grundmann@w...>
Subject: [Caml-list] Map.iter unspecified order of visiting -- reason?
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?  



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