From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 9865EBC8E for ; Tue, 15 Feb 2005 11:33:18 +0100 (CET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1FAXIYL018721 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 15 Feb 2005 11:33:18 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1D1016-0005tl-00; Tue, 15 Feb 2005 10:33:16 +0000 Date: Tue, 15 Feb 2005 10:33:16 +0000 To: Aaron Bohannon Cc: caml-list@yquem.inria.fr, ocaml-lib-devel@lists.sourceforge.net Subject: Re: [Caml-list] String to list to string Message-ID: <20050215103316.GA21083@furbychan.cocan.org> References: <420ac293.30127b31.1fa8.0b02@smtp.gmail.com> <200502100341.46451.jon@jdh30.plus.com> <42114D83.5000905@cis.upenn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <42114D83.5000905@cis.upenn.edu> User-Agent: Mutt/1.3.28i From: Richard Jones X-Miltered: at concorde with ID 4211CFEE.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 iter:01 iter:01 char:01 char:01 trivial:01 notepad:01 strings:01 functions:01 functions:01 logical:01 purely:02 functional:02 functional:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Mon, Feb 14, 2005 at 08:16:51PM -0500, Aaron Bohannon wrote: > Instead of adding one of these functions, I would much rather see a=20 > "fold" function on strings in the String module. The Array module has=20 > both "iter" and "fold" functions. Why, then, would the String module=20 > provide an "iter" but no "fold"--in a functional language?? The=20 > addition of a fold function would very often eliminate the need to=20 > convert a string to a char list or to introduce imperative-style=20 > programming into an otherwise purely functional section of code (not to= =20 > mention that writing "char_list_of_string" would become trivial if it=20 > ever were necessary to do so). >=20 > I acknowledge the fact that I can write my own fold function, but I just= =20 > wanted to point out that this seems to be the most logical addition to=20 > the String module. If you can suggest suitable fold_left and fold_right functions, then they can be added to ExtLib. Rich. --=20 Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.c= om