[plt-scheme] Android; compiling to Java byte code; Clojure

From: Benjamin L. Russell (dekudekuplex at yahoo.com)
Date: Sat Nov 24 16:07:15 EST 2007

Yes, I see the problem now:  It is not clear how to
perform mutual recursion in Clojure.

Since there is no letrec, a combination of let, loop,
and recur apparently must be used.  However, by
definition, all three special forms bind sequentially,
so it is not clear how to create mutually recursive
definitions.  Without mutually recursive definitions,
it does not seem possible to translate your procedure
into Clojure.

I checked all over their Web site and searched through
their Googol group "Clojure" ( see
http://groups.google.com/group/clojure ) for
information on special forms allowing mutual
recursion, but couldn't find anything.  In addition, I
performed string searches on "Clojure" with both
"mutual recursion" and "mutually recursive," but,
surprisingly, came up with nothing.  Strangely, nobody
there has apparently asked about this yet.

I'll probably need to ask on their Googol group about
a workaround for mutual recursion; I can't find one
anywhere in their online Clojure documentation.  If I
come up with anything, I'll post it here.

Benjamin L. Russell

--- Shriram Krishnamurthi <sk at cs.brown.edu> wrote:

> I don't know the recursive binding semantics of
> Clojure (or, indeed,
> anything else about it), but your translation
> (a) does different things for the init state than
> for the more state
> (b) accumulates context for the transition from init
> to more.
> So now suppose I wanted init and more to invoke one
> another an
> arbitrary number of times?
> Shriram

Posted on the users mailing list.