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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL 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 F01C8BC69 for ; Wed, 2 May 2007 12:03:36 +0200 (CEST) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l42A3ZTl004833 for ; Wed, 2 May 2007 12:03:36 +0200 Received: by an-out-0708.google.com with SMTP id c24so75326ana for ; Wed, 02 May 2007 03:03:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eCBGWeoLhBZReNDEE8fuYLA852/ck98Amkmwc7eiNGvrvpxWVMDdABwbRiBTvbwY29q+Tlba5WWvwZgSchYQV6yzSlB1oQlTNqr5QKV8xNec3whoachEB1iOT1FM7VPdEagNTc75A/yVE/fix3Etp5bUgld35UOpTWVD/x3OroM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k6Dzf0dY+Oen2Ka4gVvhEAWM5KJhVYe/MPMT7AZEydHpjdGKSCg0QyHAt2O8FIBAUTGAgXjux68ou6SCQDHKZrQNXUSZsrKI59UUcKRO0f/wyxrlAgBPTh/eJotH70Ew3gRuVfDNChFMrkDt9Lu3Qrlf/xaDXgp/qbnLZgo6unY= Received: by 10.100.34.16 with SMTP id h16mr328911anh.1178100209203; Wed, 02 May 2007 03:03:29 -0700 (PDT) Received: by 10.100.168.16 with HTTP; Wed, 2 May 2007 03:03:29 -0700 (PDT) Message-ID: <6f9f8f4a0705020303t33edb49ev6299f120ea9f7e9a@mail.gmail.com> Date: Wed, 2 May 2007 12:03:29 +0200 From: "Loup Vaillant" To: "Caml mailing list" Subject: Re: [Caml-list] lazy lists In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6f9f8f4a0705010847x54ed4928o7e4871e70255c0d7@mail.gmail.com> <200705012043.28021.jon@ffconsultancy.com> X-j-chkmail-Score: MSGID : 463861F7.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 463861F7.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; functionnal:01 camlp:01 ocaml:01 recursion:01 syntax:01 wrote:01 wrote:01 caml-list:01 lazy:02 match:02 functional:02 let:03 pattern:04 stream:04 matching:06 2007/5/2, Nicolas Pouillard : > On 5/1/07, Jon Harrop wrote: > > On Tuesday 01 May 2007 16:47, Loup Vaillant wrote: > > > The equivalent is the functionnal streams, describe briefly in the > > > camlp4 manual. > > > > Aren't ocaml stream destructive? > > Yes they are. Regular streams are destructive. I was talking about "functional" ones. I didn't try them myself, but the manual says one can perform left recursion with them (thanks to their non destructive nature). Mind the pattern matching, though: it is quite different from the one used with regular streams. the syntax looks like: let f s = match s with fparser (* and not just 'parser' *) ... If I remember well. Loup Vaillant