Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-08-15 (21:30)
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 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: