replace method

IMap<K, V> replace(
  1. K key,
  2. V value
)

Implementation

IMap<K,V> replace(K key,V value) {
  final Map<K,V> newMap = Map<K,V>.from(unlock);
  newMap[key] = value;
  return newMap.lock;
}