       map_acc, :done ->
         map_acc
 
-      _, :halt ->
+      _map_acc, :halt ->
         :ok
     end
 

    end

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

    {[], fun}

      acc, :done ->
        IO.iodata_to_binary(acc)

      __acc, :halt ->
        :ok
    end

