|
From: Darrin T. <dar...@gm...> - 2009-07-29 02:38:50
|
On Tue, Jul 28, 2009 at 9:02 PM, Slava Pestov<sl...@fa...> wrote: > Perhaps instead of with-return/loop you could structure the word as a > tail-recursive function. The way its coded right now it doesn't return > the 'obj' parameter on the stack. > > If you make it tail recursive, you'll need to tell the compiler that > 'quot' is a quotation, and declare it 'inline recursive': > > :: delay-retry ( param quot: ( param -- result ) staller -- result ) > ... ; inline recursive > Oops, I meant to try the code without param. That's a relic earlier hacking with it. As it stands I was able to feed the geocoder to it and it did run. I tried tail recursion first. I had trouble getting it balanced. The biggest problem I have with using locals is I can't figure out a simple way to infer quotations when I'm out of balance. The times I need locals are times when unbalanced branches are most likely to come up. -- Darrin |