Changes

Jump to navigation Jump to search
2 bytes removed ,  12:57, 12 September 2014
| '''Examples'''
|
* <code>array:sort(array { reverse(1 to 3) })</code> returns <code>[1, 2, 3]</code>.
* <code>array:sort([3, -2, 1], abs#1)</code> returns <code>[1, -2, 3]</code>
* <code>array:sort([1,2,3], function($x) { -$x })</code> returns <code>[3, 2, 1]</code>
* <code>array:sort((1, 'a'))</code> returns an error (strings and integers cannot be compared).
|}
Bureaucrats, editor, reviewer, Administrators
12,024

edits

Navigation menu