 
   """
   @spec keyreplace([tuple], any, non_neg_integer, tuple) :: [tuple]
-  def keyreplace(list, key, position, new_tuple) do
+  def keyreplace(list, key, position, new_tuple) when is_integer(position) do
     :lists.keyreplace(key, position + 1, list, new_tuple)
   end
 


  """
  @spec keydelete([tuple], any, non_neg_integer) :: [tuple]
  def keydelete(list, key, position) do
    :lists.keydelete(key, position + 1, list)
  end



  """
  @spec keymember?([tuple], any, non_neg_integer) :: boolean
  def keymember?(list, key, position) when is_integer(position) do
    :lists.keymember(key, position + 1, list)
  end

