Sort an integer array: Difference between revisions
m
→{{header|J}}: Use wiki link
m (Removed system.cmp as there is an overloaded procedure which use "system.cmp" by default.) |
m (→{{header|J}}: Use wiki link) |
||
Line 1,228:
/:~ a
15 36 39 43 51 63 69 89 92 92</lang>
Arrays of any rank are treated as lists of component arrays. Thus <tt>/:~</tt> sorts not only atoms within a list, but whole lists within a table, tables within a three-axis array, and so on. The level of structure at which sorting occurs may also be specified, so that <tt>/:~"1</tt> sorts the atoms within the finest-grained list within the array, regardless of the overall rank of the array. See the [
This code also applies to any data type.
|