Raul wrote:
>  good examples of J code which would be suitable 
>  for tail recursion?

>  a useful, recursive function, in J, where
>  we never need to retain state from multiple verb
>  contexts.

If I were interested in specific examples of RTCs in J (as opposed to
supporting TCO as general, special code) I might think of tree applications,
where trees are represented by nested boxes.  Of course, trees can be
adequately represented by (sparse) open arrays and handled as such, but at
least my first instinct in processing trees is boxes and  $:  .  I would
call that the "natural approach", and it is the sort of thing I would like
to see optimized (so that I don't have to come up with insightful new
approaches).

I might also search the Forum archives for instances of the phrase "stack
error", or  $:  more generally (which won't be too overwhelming, as  $:
doesn't see much use in J, for the reasons previously discussed).

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to