(array: [] $T, f: (T, T) -> $R)
Sorts an array view in place with a three-way comparator: negative, zero or positive. Quicksort partitions around a median of three; a range that nests too deep falls back to heap_sort, and short ranges finish with insertion_sort.