All Articles

Descending Sort with Enum.sort for Lists without using Enum.reverse

Reverse sort in Elixir 1.10

In Elixir 1.10 you can simply pass an additional :desc atom as a second argument to Enum.sort

Enum.sort(collection, :desc)