From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 26AF5BBAF for ; Tue, 16 Feb 2010 17:22:01 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkMDAE9UekvRVd2xkGdsb2JhbACBQoQyiTAsgWyJBFIIFQEBAQEJCQwHEwMgrkeBToRfiHIBAQMFhFYEgxQ X-IronPort-AV: E=Sophos;i="4.49,485,1262559600"; d="scan'208";a="44908583" Received: from mail-qy0-f177.google.com ([209.85.221.177]) by mail3-smtp-sop.national.inria.fr with ESMTP; 16 Feb 2010 17:22:00 +0100 Received: by qyk7 with SMTP id 7so5933764qyk.10 for ; Tue, 16 Feb 2010 08:21:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=magvK1Fvuht3jbu3leWjOIQOuMQKSQmyGZY+PXxuWak=; b=xFAY0tBpmUwxgLVDKEyGSa+V3E2N4KtTp1rhh2kU+SfXqRilYq2PMj9jPwuz0ewOMF w08DMZRvtEFOjUHZHCDDM7qI+ryuOil35VUipn4TYDEyXQkPlFF/B8QKSZcGHW11ltJK kvXhwI0g2MiMpLEXBTlV/iJdkhen+/ftUnauc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=L7vEYyXcmqSTh8CVivCiXRPc1L85wIWnb595ku0AQgOGpDv5Xqjc7dLSU3rDH/uOQg v4Kfp2FQ4XvusAY+03qlT2jVsVj+tElFj0ivqtRGzCpLo2/mYGLrC8MO3wP85bu1HTYP 9zjbbPFMrN4+8lsOx+ZUeyI61CGVObVfGx8rI= MIME-Version: 1.0 Received: by 10.231.145.196 with SMTP id e4mr2198081ibv.54.1266337319177; Tue, 16 Feb 2010 08:21:59 -0800 (PST) In-Reply-To: References: <1e7471d51002091250of7a686fq537a03c9401c868f@mail.gmail.com> <9d3ec8301002101425k356b92e0p6ca2690d8cd6399d@mail.gmail.com> <201002151733.37298.jon@ffconsultancy.com> From: Ashish Agarwal Date: Tue, 16 Feb 2010 11:21:39 -0500 Message-ID: Subject: Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion To: Stefan Monnier Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=0016e64ec1a213522d047fba22bf X-Spam: no; 0.00; recursive:01 defintion:01 ocaml:01 koans:01 ocaml:01 compiler:01 recursive:01 compiler:01 val:01 beginner's:01 bug:01 koans:01 val:01 beginner's:01 bug:01 --0016e64ec1a213522d047fba22bf Content-Type: text/plain; charset=ISO-8859-1 It may be worth recalling the OCaml koans at http://eigenclass.org/hiki/fp-ocaml-koans. The first one is: let rec One day, a disciple of another sect came to Xavier Leroy and said mockingly: "The OCaml compiler seems very limited: why do you have to indicate when a function is recursive, cannot the compiler infer it?" Xavier paused for a second, and replied patiently with the following story: "One day, a disciple of another sect came to Xavier Leroy and said mockingly..." On Tue, Feb 16, 2010 at 9:42 AM, Stefan Monnier wrote: > > It sure does, tho not with "fun" but only with "var" definitions. > ^^^ > val > > Stefan "blush!" > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --0016e64ec1a213522d047fba22bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It may be worth recalling the OCaml koans at=A0http://eigenclass.org/hiki/fp-ocaml-koans.=A0= The first one is:

let rec

One day, a disciple of another sect came to Xavier Leroy and= said mockingly:

"The OCaml compiler seems very limited: why do = you have to indicate when a function is recursive, cannot the compiler infe= r it?"

Xavier paused for a second, and replied patiently with the following sto= ry:

"One day, a disciple of another sect came to Xavier Leroy an= d said mockingly..."



On Tue, Feb 16, 2010 at 9:42 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> It sure does, tho not with "fun" but only = with "var" definitions.
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^^^
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0val

=A0 =A0 =A0 =A0Stefan "blush!"

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.in= ria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--0016e64ec1a213522d047fba22bf--