Keyword.put_new
You're seeing just the function
put_new
, go back to Keyword module for more information.
Specs
Puts the given value
under key
unless the entry key
already exists.
Examples
iex> Keyword.put_new([a: 1], :b, 2)
[b: 2, a: 1]
iex> Keyword.put_new([a: 1, b: 2], :a, 3)
[a: 1, b: 2]