Keyword.replace!/3
defmodule Keyword do
def replace!(keywords, key, value)
end
Puts value
under key
only if the key already exists in keywords.
In case the key exists multiple times in the keyword list, it removes later occurrences.
If key
is not present in keywords
, a KeyError
exception is raised.