array
using the compare
function.var a = [10, 2, 3, 1, 4]
default_comparator.sort(a)
assert a == [1, 2, 3, 4, 10]
alpha_comparator.sort(a)
assert a == [1, 10, 2, 3, 4]
# Sort `array` using the `compare` function.
#
# var a = [10, 2, 3, 1, 4]
# default_comparator.sort(a)
# assert a == [1, 2, 3, 4, 10]
# alpha_comparator.sort(a)
# assert a == [1, 10, 2, 3, 4]
fun sort(array: Array[COMPARED]) do sub_sort(array, 0, array.length-1)
lib/core/collection/sorter.nit:82,2--89,71