From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA10898; Tue, 22 May 2001 18:52:11 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA10886 for ; Tue, 22 May 2001 18:52:10 +0200 (MET DST) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f4MGq9n17785 for ; Tue, 22 May 2001 18:52:09 +0200 (MET DST) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id SAA25464; Tue, 22 May 2001 18:52:06 +0200 (MET DST) Date: Tue, 22 May 2001 18:52:06 +0200 From: Markus Mottl To: Miles Egan Cc: caml-list@inria.fr Subject: Re: [Caml-list] lisp -> ocaml Message-ID: <20010522185206.A9187@miss.wu-wien.ac.at> References: <20010522093341.A97425@caddr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010522093341.A97425@caddr.com>; from miles@caddr.com on Tue, May 22, 2001 at 09:33:41 -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 () Regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr