On Fri, Dec 18, 2009 at 5:20 PM, Dan Bron <[email protected]> wrote: >> phase 2: how would you implement this mechanism >> in J, given the atomic representations of the sentences >> in question. > > I don't know, how do other functional languages do it? A while loop and a > stack?
There are two issues here: Recognizing TCO -- this winds up being symbolic manipulation of the code, and generally winds up with some obscure corner cases which most people tolerate and other people get frustrated with. Handling TCO -- this winds up being a while loop without a stack. If you need a stack, it is not tail recursion. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
