updateAt method

Option<Map<K, V>> updateAt(
  1. Eq<K> eq,
  2. K key,
  3. V value
)

If the given key is present in the Map, then update its value to value.

Otherwise, return None.

Implementation

Option<Map<K, V>> updateAt(Eq<K> eq, K key, V value) =>
    modifyAt(eq, (_) => value, key);