           t,
           (element, element -> boolean) | :asc | :desc | module() | {:asc | :desc, module()}
         ) :: list
-  def sort(enumerable, fun) when is_list(enumerable) do
-    :lists.sort(to_sort_fun(fun), enumerable)
-  end
-
-  def sort(enumerable, fun) do
-    fun = to_sort_fun(fun)
+  def sort(enumerable, sorter) when is_list(enumerable) do
+    :lists.sort(to_sort_fun(sorter), enumerable)
+  end
+
+  def sort(enumerable, sorter) do
+    fun = to_sort_fun(sorter)
 
     reduce(enumerable, [], &sort_reducer(&1, &2, fun))
     |> sort_terminator(fun)


  ## Ascending and descending

  `sort/2` allows a developer to pass `:asc` or `:desc` as the sorting
  function, which is a convenience for `<=/2` and `>=/2` respectively.

      iex> Enum.sort([2, 3, 1], :asc)
      [1, 2, 3]


  This function maps each element of the `enumerable` using the
  provided `mapper` function. The enumerable is then sorted by
  the mapped elements using the `sorter`, which defaults
  to [`&<=/2`](`<=/2`).

  `sort_by/3` differs from `sort/2` in that it only calculates the
  comparison value for each element in the enumerable once instead of
