[plt-scheme] Android; compiling to Java byte code; Clojure
This is exactly what I meant by my parenthetical remark,
"I think this example is not so hard with RECUR".
[Robby of course knew what I was referring to; this clarification is
for the benefit of others following along at home.]
Shriram
On Nov 24, 2007 4:14 PM, Robby Findler <robby at cs.uchicago.edu> wrote:
> 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).
>
> Robby
>
>
> 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
> >
>