Keyword.update/4

defmodule Keyword do
  def update(keywords, key, value, fun)
end

Updates the key in keywords with the given function. If there are duplicated keys, they are all removed and only the first one is updated.

If the key does not exist, inserts the given value value.