On Thu, Mar 21, 2013 at 9:24 PM, David Ward Lambert
<[email protected]> wrote:
> cw=:|:@:|. NB. clockwise matrix rotation
> assert (> 3 0 ; 4 1 ; 5 2) -: cw i. 2 3
>
> spiral =: (, (>:@:(*/) + i.@:}.)@:$)@:cw
> assert (> 5 4 3 ; 6 1 2 ; 7 8 9) -: (spiral^:4)1 1$1

Ah, look!  That looks like a new solution to the spiral problem we've
dicussed on this mailing list a while ago.  See the old thread near

http://www.jsoftware.com/pipermail/programming/2007-December/009009.html

Ambrus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to