Keyword.pop_first/3

defmodule Keyword do
  def pop_first(keywords, key, default \\ nil)
end

Returns the first value for key and removes all associated entries in the keyword list.

It returns a tuple where the first element is the first value for key and the second element is a keyword list with all entries associated with key removed.

If the key is not present in the keyword list, {default, keywords} is returned.