My first instinct would be
v =: ({"_1) 1 0 2&|:
although this does not generalize to higher-rank arrays without a little
work. The following adverb also works, but goes through boxes and
consequently is probably a bit inefficient.
v =: } (&.:(<"1))
Marshall
On Fri, Jul 11, 2014 at 05:56:49PM -0700, 'Pascal Jasmin' via Programming wrote:
> what verb v (or I guess adverb is ok) could I use to get
>
> 0 1 1 v i. 2 3 2
>
> 0 1
> 8 9
> 10 11
>
>
> i.2 3 2
> 0 1
> 2 3
> 4 5
> 6 7
> 8 9
> 10 11
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm