trans =: |:~   1 -.~ i...@#@$

Henry Rich

Andrew Nikitin wrote:
>> Zsbán Ambrus ambrus at math.bme.hu
>> Sun Dec 20 07:04:52 HKT 2009
>>
>> I'd like to find the best implementation for shallow transpose, a
>> monad that swaps the first two axis of a noun.
> 
> Oops, you said FIRST two axis. Here it is:
> 
> trans=:|:~ (<0 1) C. i...@#@$
> trans=:|:~ 1 0 (0 1)} i...@#@$
> 
>                                         
> _________________________________________________________________
> Hotmail: Powerful Free email with security by Microsoft.
> http://clk.atdmt.com/GBL/go/171222986/direct/01/
> ----------------------------------------------------------------------
> 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