   end
 
   def update!(%HashDict{root: root, size: size} = dict, key, fun) when is_function(fun, 1) do
-    {root, counter} = do_update(root, key, fn -> raise KeyError, key: key, term: dict end,
-                                fun, key_hash(key))
+    {root, counter} =
+      do_update(root, key, fn -> raise KeyError, key: key, term: dict end, fun, key_hash(key))
+
     %HashDict{root: root, size: size + counter}
   end
 


  defp do_fetch(node, key, hash) do
    index = key_mask(hash)
    case elem(node, index) do
      [^key | v]   -> {:ok, v}
      {^key, v, _} -> {:ok, v}
      {_, _, n}    -> do_fetch(n, key, key_shift(hash))
      _            -> :error
    end
  end

  defp do_put(node, key, value, hash) do
    index = key_mask(hash)
    case elem(node, index) do
      [] ->
        {put_elem(node, index, [key | value]), 1}
      [^key | _] ->
        {put_elem(node, index, [key | value]), 0}
      [k | v] ->
        n = put_elem(@node_template, key_mask(key_shift(hash)), [key | value])
        {put_elem(node, index, {k, v, n}), 1}
      {^key, _, n} ->
        {put_elem(node, index, {key, value, n}), 0}
      {k, v, n} ->
        {n, counter} = do_put(n, key, value, key_shift(hash))
        {put_elem(node, index, {k, v, n}), counter}

  @doc """
  Creates a new empty dict.
  """
  @spec new :: Dict.t()
  def new do
    %HashDict{}
  end
