t=:,0&{.
The above seems like a simpler way to reshape items of an array if
necessary. Then I becomes
I=:(t i. t~) f.
If catenate (,) had special code to recognize that if one argument to
catenate had no items and the shape of it were such that the other argument
would not be changed and simply pass it on, then t should take very little
time and space if reshaping were unnecessary. But if the added time to
handle the special code for other forms of catinate were significant this
would not be a good idea.
It seems to me that the expression t is simple enough that it could be
used with i. when needed instead of extending the definition of i. .
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm