Is the following the expected behaviour of using M.
data =: (< @ (?~)@?)1e5#10
A =: 5#5
B =: 5?5
foo_with_M =: 3 : 0 M.
n =:?1e5
data =:(<>:n{::aa)n}aa
n;n{::data
)
foo_with_M "0 B
|85156| |
+-----+-----------+
|37421|3 2 1 5 4 |
+-----+-----------+
|13050| |
+-----+-----------+
|3441 |5 1 3 2 4 6|
+-----+-----------+
|30853|3 4 2 1 |
+-----+-----------+
foo_with_M "0 A
+-----+---------------+
|98897|3 2 8 1 4 6 5 7|
+-----+---------------+
|98897|3 2 8 1 4 6 5 7|
+-----+---------------+
|98897|3 2 8 1 4 6 5 7|
+-----+---------------+
|98897|3 2 8 1 4 6 5 7|
+-----+---------------+
|98897|3 2 8 1 4 6 5 7|
+-----+---------------+
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm