       nil
 
   """
-  @spec max_by(
-          t,
-          (element -> any),
-          (element, element -> boolean) | module()
-        ) :: element | empty_result
-        when empty_result: any
   @spec max_by(
           t,
           (element -> any),

  defp min_sort_fun(module) when is_atom(module), do: &(module.compare(&1, &2) != :gt)

  @doc false
  @spec min_by(t, (element -> any), (() -> empty_result)) :: element | empty_result
        when empty_result: any
  def min_by(enumerable, fun, empty_fallback)
      when is_function(fun, 1) and is_function(empty_fallback, 0) do

      nil

  """
  @spec min_by(
          t,
          (element -> any),
