updateAtIfPresent method

Map<K, V> Function(K key, V value) updateAtIfPresent(
  1. Eq<K> eq
)

If the given key is present in the Map, then update its value to value. Otherwise, return the original unmodified Map.

Implementation

Map<K, V> Function(K key, V value) updateAtIfPresent(Eq<K> eq) =>
    (K key, V value) => updateAt(eq)(key, value).getOrElse(() => this);