 
   def random(enumerable) do
     result =
-      case Enumerable.slice(enumerable) do
+      case backwards_compatible_slice(enumerable) do
         {:ok, 0, _} ->
           []
 

  end

  defp slice_any(enumerable, start, amount) do
    case Enumerable.slice(enumerable) do
      {:ok, count, _} when start >= count ->
        []


    lower_limit + :rand.uniform(upper_limit - lower_limit + 1) - 1
  end

  # TODO: Remove me on Elixir v1.8
  defp backwards_compatible_slice(args) do
    try do
      Enumerable.slice(args)
    catch
      :error, :undef ->
        case System.stacktrace() do
          [{module, :slice, [^args], _} | _] -> {:error, module}
          stack -> :erlang.raise(:error, :undef, stack)
        end
    end
  end

  ## Implementations

  ## all?
