Available on all platforms
ListSort provides a stable implementation of merge sort through its
method. It has a O(N.log(N)) complexity and does not require additional memory allocation.
staticinlinesort<T>(list:T, cmp:(T, T) ‑> Int):T
lst according to the comparison function
cmp(x,y) returns 0 if
x == y, a positive Int if
x > y and a
negative Int if
x < y.
This operation modifies List
a in place and returns its head once modified.
prev of the head is set to the tail of the sorted list.
cmp are null, the result is unspecified.
staticinlinesortSingleLinked<T>(list:T, cmp:(T, T) ‑> Int):T
sort but on single linked list.