Map.put_new/3
defmodule Map do
def put_new(map, key, value)
end
Puts the given value under key unless the entry key already exists.
If map doesn’t contain key then it’s added using value as value.
defmodule Map do
def put_new(map, key, value)
end
Puts the given value under key unless the entry key already exists.
If map doesn’t contain key then it’s added using value as value.