Tests/IMToolsTests.cs
/// <summary>Produces the new map with the new entry or keeps the existing map if the entry with the key is already present</summary>
Produces the new map with the new entry or keeps the existing map if the entry with the key is already present
Produces the new map with the new entry or keeps the existing map if the entry with the key is already present
[MethodImpl((MethodImplOptions)256)]
        public static ImHashMap234<K, V> AddOrKeep<K, V>(this ImHashMap234<K, V> map, K key, V value)
        {
            var hash = key.GetHashCode();
            return map.AddOrKeepEntry(hash, new ImHashMap234<K, V>.ValueEntry(hash, key, value));
        }
[ MethodImpl ( ( MethodImplOptions ) 256 ) ] public static ImHashMap234 < K , V > AddOrKeep < K , V > ( this ImHashMap234 < K , V > map , K key , V value ) { var hash = key . GetHashCode ( ) ; return map . AddOrKeepEntry ( hash , new ImHashMap234 < K , V > . ValueEntry ( hash , key , value ) ) ; }
Produces the new map with the new entry or keeps the existing map if the entry with the key is already present
Produces the new map with the new entry or keeps the existing map if the entry with the key is already present
ImHashMap234<K, V>
this
key
K
value
V