From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA26901; Wed, 17 Jul 2002 10:13:48 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA26819 for ; Wed, 17 Jul 2002 10:13:47 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com (r-mi214-6a54.tin.it [62.211.4.54]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6H8DjX09517; Wed, 17 Jul 2002 10:13:46 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id 251742724F; Wed, 17 Jul 2002 10:20:53 +0200 (CEST) Message-ID: <3D3528E5.50308@baretta.com> Date: Wed, 17 Jul 2002 10:20:53 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: it, en MIME-Version: 1.0 To: Francois.Pottier@inria.fr, Ocaml Subject: Re: [Caml-list] Queue.fold? References: <3D347E79.7060002@baretta.com> <20020717091932.A25636@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Francois Pottier wrote: >>Is there any specific reason for not having a Queue.fold >>function in the standard library? > > > Your version of fold empties the queue as a side effect, which is > usually not part of the semantics of fold. > > That said, there is an implementation of Queue.fold in the CVS version of > O'Caml (along with a slightly more efficient implementation of all Queue > functions). Give me O'Caml 3.05! Please... Thank you for pointing out the nasty side-effects of my implementation. Now I fixed it. Alex ------------------- 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