Hello
for me, the current sort function seems very clear: in the resulting enumeration, the predicate will be true for any two adjacent elements.
iex(14)> 1..10 |> Enum.to_list
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
iex(15)> Enum.sort(1..10, &>=/2)
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
iex(16)> 10..1 |> Enum.to_list
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
iex(17)> Enum.sort(10..1, &<=/2)
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
I also do not remember of other programming languages having both a "sort" and "reverse_sort" functions.
With this in mind, I think we do not need yet another function in an already long Enum interface.
Regards,
Mário