updateAtIfPresent method
If the given key
is present in the Map, then update its value to value
.
Otherwise, return a copy of the original unmodified Map.
Implementation
Map<K, V> updateAtIfPresent(
Eq<K> eq,
K key,
V value,
) =>
updateAt(eq, key, value).getOrElse(
() => {...this},
);