From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E24DBBC69 for ; Fri, 9 Mar 2007 11:01:02 +0100 (CET) Received: from ipmail03.adl2.internode.on.net (ipmail03.adl2.internode.on.net [203.16.214.135]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l29A106I009149 for ; Fri, 9 Mar 2007 11:01:01 +0100 Received: from ppp19-103.lns2.syd7.internode.on.net (HELO [192.168.1.201]) ([59.167.19.103]) by ipmail03.adl2.internode.on.net with ESMTP; 09 Mar 2007 20:30:59 +1030 X-IronPort-AV: i="4.14,267,1170595800"; d="scan'208"; a="60327555:sNHT24115217" Subject: Re: [Caml-list] Operator overloading From: skaller To: Tom Cc: caml-list@yquem.inria.fr, Robert Fischer In-Reply-To: References: <3D1E4D9CA9BCE04D8F2B55F203AE4CE30666AB74@selma.roomandboard.com> <1173397864.6613.49.camel@rosella.wigram> <1173432251.22738.2.camel@rosella.wigram> Content-Type: text/plain Date: Fri, 09 Mar 2007 21:00:54 +1100 Message-Id: <1173434454.22738.4.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45F1305C.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; overloading:01 0100,:01 elt:01 snake:98 sourceforge:01 sourceforge:01 wrote:01 wrote:01 caml-list:01 define:01 define:01 defined:02 len:02 let:03 fri:05 On Fri, 2007-03-09 at 10:32 +0100, Tom wrote: > > On 09/03/07, skaller wrote: > > Actually, length can be defined in turns of fold: > > let len x = fold (fun acc elt -> acc + 1) 0 container > > Yes, as long as x is a container. But how are you going to define a > length of a snake using fold? That's a different kind of length. Now if you said 'worm' there would be two kinds of length to define: (a) the length in metres (b) the number of segments -- John Skaller Felix, successor to C++: http://felix.sf.net