Enum

sort_by/3

sort_by(enumerable, mapper, sorter \\ &<=/2)

Sorts the enumerable by mapping each element using the provided mapper function and then sorting the mapped elements using the sorter function, which defaults to Kernel.<=/2.