Here's an ugly one:
,"_1&.>/ 2 <@,.\"1 A
=@@i
Dan Bron schreef:
> Aai wrote:
>
>> , 2 2 <;. _3 &.|:A
>>
>
> That &. is superfluous.
>
> Also, here's another method using cut, though it is less elegant:
>
> (1 0 $~ {:$A) <;.1 |: A
>
> you could also move the |: inside the cut, though that's likely slower:
>
> ( '' ; 1 0 $~ {:$A ) <@:|:;.1 A
>
> I wonder if there's a way to do this without transposing (or its
> equivalents).
>
> -Dan
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm