           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)


  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` function, which defaults
  to `Kernel.<=/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


  ## Examples

  Using the default `sorter` of [`&<=/2`](`<=/2`) :

      iex> Enum.sort_by(["some", "kind", "of", "monster"], &byte_size/1)
      ["of", "some", "kind", "monster"]
