caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>
To: "Arthur Chan" <baguasquirrel@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Mutually recursive functions in different modules
Date: Tue, 18 Sep 2007 13:17:17 +0200	[thread overview]
Message-ID: <18159.46013.820350.961353@serveur9-10.lri.fr> (raw)
In-Reply-To: <74cabd9e0709172327g42d34407wc7027db6d8c6fba6@mail.gmail.com>


Arthur Chan writes:
 > Hey all,
 > 
 > Is it possible to have mutually recursive functions in separate modules?
 > 
 > For example, is it possible for function x in module A to call function y in
 > module B and vice versa?

Not directly,  but at least you  can make A.x  a higher-order function
taking y as parameter and then define y in B as

	let rec y ... = ... (A.x y) ...

Hope this helps,
-- 
Jean-Christophe


  parent reply	other threads:[~2007-09-18 11:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18  6:27 Arthur Chan
2007-09-18  7:53 ` [Caml-list] " Jacques Garrigue
2007-09-18 14:16   ` Yitzhak Mandelbaum
2007-09-18 11:17 ` Jean-Christophe Filliatre [this message]
2007-09-19  8:44 ` Julien Signoles
2007-09-19 11:40   ` Andreas Rossberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18159.46013.820350.961353@serveur9-10.lri.fr \
    --to=jean-christophe.filliatre@lri.fr \
    --cc=baguasquirrel@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).