On Thu, Sep 08, 2005 at 02:08:31PM +0200, Falk Hueffner wrote: > Package: ocaml-nox > Version: 3.08.3-7 > Severity: normal > File: /usr/bin/ocamlc > > [EMAIL PROTECTED]:/tmp% cat test.ml > module IntMap = Map.Make(struct type t = int let compare = compare end);; > let make_set = List.fold_left (fun s x -> IntMap.add x 0 s) IntMap.empty;; > let () = > let s = make_set [23; 17; 616] > in > IntMap.fold (fun x _ () -> Printf.printf "%d\n" x) s () > ;; > [EMAIL PROTECTED]:/tmp% ocamlc test.ml && ./a.out > 616 > 23 > 17 > > However, the manual says (and I would expect) that keys are enumerated > in *increasing* order. Map.iter is correct in this regard.
I am not entirely sure how this works, but are you sure the fold is not doing this right, but the printf being done in reversed order ? In any case, this is an upstream issue. Friendly, Sven Luther -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]