     [value | rest]
   end
 
-  defp do_replace_at([h | t], index, value) do
-    [h | do_replace_at(t, index - 1, value)]
+  defp do_replace_at([head | tail], index, value) do
+    [head | do_replace_at(tail, index - 1, value)]
   end
 
   # insert_at

    list
  end

  defp do_update_at([h | t], index, fun) do
    [h | do_update_at(t, index - 1, fun)]
  end

  defp do_update_at([], _index, _fun) do


  """
  @spec last([elem]) :: nil | elem when elem: var
  def last([]), do: nil
  def last([head]), do: head
  def last([_ | tail]), do: last(tail)

  @doc """
  Receives a list of tuples and returns the first tuple
