   def into(original) do
     # Avoid warnings about HashSet being deprecated.
     module = HashSet
-    {original, fn
-      set, {:cont, term} -> module.put(set, term)
-      set, :done -> set
-      _, :halt -> :ok
-    end}
+
+    collector_fun =
+      fn
+        set, {:cont, term} -> module.put(set, term)
+        set, :done -> set
+        _, :halt -> :ok
+      end
+
+    {original, collector_fun}
   end
 end
 

  def delete(%HashSet{root: root, size: size} = set, term) do
    case do_delete(root, term, key_hash(term)) do
      {:ok, root} -> %HashSet{root: root, size: size - 1}
      :error      -> set
    end
  end



  defp do_member?(node, term, hash) do
    index = key_mask(hash)

    case elem(node, index) do
      [] -> false
      [^term | _] -> true
      [_] -> false
      [_ | n] -> do_member?(n, term, key_shift(hash))
    end
  end

  defp do_put(node, term, hash) do
    index = key_mask(hash)

    case elem(node, index) do
      [] ->
        {put_elem(node, index, [term]), 1}

      [^term | _] ->
        {node, 0}

      [t] ->
        n = put_elem(@node_template, key_mask(key_shift(hash)), [term])
        {put_elem(node, index, [t | n]), 1}

      [t | n] ->
        {n, counter} = do_put(n, term, key_shift(hash))
        {put_elem(node, index, [t | n]), counter}
