If f is known to be associative, f/\ proceeds from start to end in
linear time. Elijah has thoughts about how you could inform the
interpreter that a function is associative. Till that is implemented,
you can use f/\.&.|. which has linear time, or you can use Fold.
Henry Rich
On 1/9/2023 1:23 PM, Omar Antolín Camarena wrote:
Am I right in thinking that the J interpreter does use a linear time algorithm
for u/\ for some u including + and *? If so, maybe the case of +/ . * is worth
adding.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm