   """
   @doc since: "1.13.0"
   @spec keyfind!([tuple], any, non_neg_integer) :: any
-  def keyfind!(list, key, position) do
+  def keyfind!(list, key, position) when is_integer(position) do
     :lists.keyfind(key, position + 1, list) ||
       raise KeyError,
         key: key,


  """
  @spec keytake([tuple], any, non_neg_integer) :: {tuple, [tuple]} | nil
  def keytake(list, key, position) do
    case :lists.keytake(key, position + 1, list) do
      {:value, element, list} -> {element, list}
      false -> nil


  """
  @spec keysort([tuple], non_neg_integer) :: [tuple]
  def keysort(list, position) when is_integer(position) do
    :lists.keysort(position + 1, list)
  end

