Sort the vector in ascending order by comparing the
results of applying the key function to each element. The sort is
stable, meaning the order of equal elements is preserved.
sortOn f is equivalent to
sortBy
(comparing f), but only evaluates
f once for each
element.