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

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat Nov 24 16:14:19 EST 2007

I'm just guessing, but it seems likely to me that you could generate a
single loop with some kind of a dispatch in the loop, since you know
all of the states at the time you expand the macro (of course, the
expansion won't be as nice as it is SK's example).


On Nov 24, 2007 3:07 PM, Benjamin L. Russell <dekudekuplex at yahoo.com> wrote:
> 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
> >
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.