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
AW: [Caml-list] Map.fold behavior changed
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-02-24 (11:34)
From: Bauer, Christoph <Christoph.Bauer@l...>
Subject: AW: [Caml-list] Map.fold behavior changed

> 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