From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 46124BB81 for ; Fri, 24 Feb 2006 12:34:12 +0100 (CET) Received: from kaiserslautern1.lmsintl.com (Kaiserslautern1.lms-gmbh.de [213.68.136.230]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k1OBYBZT027122 for ; Fri, 24 Feb 2006 12:34:12 +0100 Received: by kaiserslautern1.lmsintl.com with Internet Mail Service (5.5.2653.19) id <149ADVGW>; Fri, 24 Feb 2006 12:34:11 +0100 Message-ID: <26EB47FDD566A7469FC862DAF373792F07D7AE@kaiserslautern1.lmsintl.com> From: "Bauer, Christoph" To: "'EEK Cooper'" , caml-list@yquem.inria.fr Subject: AW: [Caml-list] Map.fold behavior changed Date: Fri, 24 Feb 2006 12:34:06 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Miltered: at concorde with ID 43FEEF33.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 bug:01 exceptions:01 christoph:04 christoph:04 fold:06 fold:06 fixing:07 bauer:09 bauer:09 version:12 version:12 behavior:12 behavior:12 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 Hi, > My team just noticed that the behavior of Map.fold changed in OCaml > version 3.08.4. a program of mine suffers a lot from this change. In fact my boss found today a remaining hidden bug related to this change :-( What about to provide a "fold_left" (= new version) and "fold_right" (= old version)? Fixing old programs would be simple. Combined with exceptions there would be a fast solution (O(1) instead of O(n)) to find a minimum and maximum key from a large map. Christoph Bauer