dadhi / ImTools

Fast and memory-efficient immutable collections and helper data structures
MIT License
232 stars 10 forks source link

Add ImMap.Add or GetOrAdd method #20

Closed dadhi closed 5 years ago

dadhi commented 5 years ago
public static ImMap<T> GetOrAdd<T>(
    this ImMap<T> map,
    int key, out T value
) where T : class, new()
{}
dadhi commented 5 years ago

Ended up with AddOrKeep method. Returning out value is as perf hit :/