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] lisp -> ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-05-22 (16:52)
From: Markus Mottl <mottl@m...>
Subject: Re: [Caml-list] lisp -> ocaml
On Tue, 22 May 2001, Miles Egan wrote:
> Which fails to compile, for obvious reasons.  Is the solution to
> refactor the code into a nonrecursive form?  In the absence of forward
> declarations, I'm not sure what else to do.

No, you have to explicitly express that the two functions are mutually
recursive by using the "and" keyword as in, e.g.:

  let rec f () = g ()
  and g () = f ()

Markus Mottl

Markus Mottl,,
To unsubscribe, mail  Archives: