Because (,0&{.) doesn't add an item to the left argument. It's not idiot
proof as the rank of both arguments must be the same to work right. But
it's easy to understand and fill (!.) can be added to the catenate if
desired.


On Sun, Oct 27, 2013 at 9:16 AM, Brian Schott <[email protected]>wrote:

> Looks good to me.
> Why not t=:,{.  ?
>
>
> On Sun, Oct 27, 2013 at 10:54 AM, Don Guinn <[email protected]> wrote:
>
> >    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
> >
>
>
>
> --
> (B=)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to