addIfAbsent method

ImmortalMap<K, V> addIfAbsent(
  1. K key,
  2. V ifAbsent()
)

Returns a copy of this map setting the value of key if it isn't there.

See putIfAbsent.

Implementation

ImmortalMap<K, V> addIfAbsent(K key, V Function() ifAbsent) =>
    putIfAbsent(key, ifAbsent);