<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/11/7336ceb58e4b58d6cc463bc16d0abb23"
  from="Benedikt Grundmann &lt;Benedikt-Grundmann@w...&gt;"
  author="Benedikt Grundmann"
  date="2003-11-18T07:47:17"
  subject="[Caml-list] Map.iter unspecified order of visiting -- reason?"
  prev="2003/11/6da311da670a99572f6a1091fd48e228"
  next="2003/11/3b5d525e1b8a82b5d9b47af2becf951a"
  prev-thread="2003/11/6da311da670a99572f6a1091fd48e228"
  next-thread="2003/11/f112840855ba7fadd40cd35228f1ee0a"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Map.iter unspecified order of visiting -- reason?">
<msg 
  url="2003/11/7336ceb58e4b58d6cc463bc16d0abb23"
  from="Benedikt Grundmann &lt;Benedikt-Grundmann@w...&gt;"
  author="Benedikt Grundmann"
  date="2003-11-18T07:47:17"
  subject="[Caml-list] Map.iter unspecified order of visiting -- reason?">
</msg>
</thread>

<contents>
To cite the manual of Map:
val iter : (key -&gt; 'a -&gt; unit) -&gt; 'a t -&gt; 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

</contents>

</message>

