g=:i.@,~
  g 4
0  1  2  3
4  5  6  7
8  9 10 11
12 13 14 15
f=:<`(<@|.)/.
  f g 4
┌─┬───┬─────┬────────┬───────┬─────┬──┐
│0│4 1│2 5 8│12 9 6 3│7 10 13│14 11│15│
└─┴───┴─────┴────────┴───────┴─────┴──┘
h=: |:@(- ]\ /:@(;@[EMAIL PROTECTED]))
  h 4
0  1  5  6
2  4  7 12
3  8 11 13
9 10 14 15
---
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to