Keyword.put
You're seeing just the function
put
, go back to Keyword module for more information.
Specs
Puts the given value
under key
.
If a previous value is already stored, all entries are removed and the value is overridden.
Examples
iex> Keyword.put([a: 1], :b, 2)
[b: 2, a: 1]
iex> Keyword.put([a: 1, b: 2], :a, 3)
[a: 3, b: 2]
iex> Keyword.put([a: 1, b: 2, a: 4], :a, 3)
[a: 3, b: 2]