Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] trouble w/ recursive let definitions.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] trouble w/ recursive let definitions.
On Sun, 15 Aug 2004, Shishir Ramam wrote:

> Hi,
> I might be missing something here, but recursive let definitions have me a 
> little confused. The two cases below narrow down my problem. Why is case-2
> invalid?

rec binds with the let, and not the function name.  This gets me 
occassionally as well.  So if you have:

let rec f ... = ...
and g ... = ...

both f and g are recursive functions.  All of the functions you define 
after with however many 'and' clauses are all recursive.

-- 
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 
Brian

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners