Louis wrote:
> The problem is that u^:v^:_ y terminates
> either when 0 = v y OR when y -: u y .
Yeah, this has bitten us all at one time or another. The traditional solution
is to add a little tag to the data structure which you mutate (along with the
normal processing) at every iteration. Most commonly we just do (u@:>@:{. ;
-.&.>@:{:)^:v^:_ y ; 0 (adjusting the boxing logic as needed).
I asked for better alternatives than this a few years back [1], but we didn’t
come up with anything compelling.
-Dan
[1] J Programming thread, “Limit limitation, Oct 2009:
http://www.jsoftware.com/pipermail/programming/2009-October/016513.html
<http://www.jsoftware.com/pipermail/programming/2009-October/016513.html>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm