Version française
Home     About     Download     Resources     Contact us    
Browse thread
The need to specify 'rec' in a recursive function defintion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ashish Agarwal <agarwal1975@g...>
Subject: Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion
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 <monnier@iro.umontreal.ca>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
>