     end
 
     fun = fn
-      list, {:cont, x} -> [x | list]
-      list, :done -> original ++ :lists.reverse(list)
+      list_acc, {:cont, elem} -> [elem | list_acc]
+      list_acc, :done -> list ++ :lists.reverse(list_acc)
       _, :halt -> :ok
     end
 

  For examples on how to use the `Collectable` protocol and `into/1` see the
  module documentation.
  """
  @spec into(t) :: {term, (term, command -> t | term)}
  def into(collectable)
end

defimpl Collectable, for: List do
  def into(original) do
    if original != [] do
      IO.warn(
        "the Collectable protocol is deprecated for non-empty lists. The behaviour of " <>
          "things like Enum.into/2 or \"for\" comprehensions with an :into option is incorrect " <>

        :ok
    end

    {[binary], fun}
  end

  def into(bitstring) when is_bitstring(bitstring) do
    fun = fn
      acc, {:cont, x} when is_bitstring(x) ->
        <<acc::bitstring, x::bitstring>>
