Array class.
a = .array~of("Fred", "George", "FRED", "Mike", "fred")
a~sortwith(.caselesscomparator~new)
do name over a
say name
end
stableSort and stableSortWith methods.
These methods use a Mergesort algorithm, which is less efficient than the default Quicksort and requires
additional memory. The Mergesort is a stable algorithm that maintains the original
relative ordering of equivalent items. Our example above, sorted with stableSortWith,
would display "Fred", "FRED", "fred".