List.keytake/3

defmodule List do
  def keytake(list, key, index)
end

Receives a list of tuples and returns the first tuple where the element at index in the tuple matches the given key, as well as the list without found tuple.

If such a tuple is not found, nil will be returned.