 
   """
   @spec delete_at(list, integer) :: list
-  def delete_at(list, index) do
+  def delete_at(list, index) when is_integer(index) do
     if index < 0 do
       do_delete_at(list, length(list) + index)
     else


  """
  @spec insert_at(list, integer, any) :: list
  def insert_at(list, index, value) do
    if index < 0 do
      do_insert_at(list, length(list) + index + 1, value)
    else


  """
  @spec update_at([elem], integer, (elem -> any)) :: list when elem: var
  def update_at(list, index, fun) when is_function(fun, 1) and is_integer(index) do
    if index < 0 do
      do_update_at(list, length(list) + index, fun)
    else
