On Tue, Jul 28, 2009 at 9:02 PM, Slava Pestov<[email protected]> 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 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
