DavidArno / SuccincT

Discriminated unions, pattern matching and partial applications for C#
MIT License
266 stars 15 forks source link

Succinc<T> should support an option-based Dictionary.TryGetValue #7

Closed DavidArno closed 7 years ago

DavidArno commented 8 years ago

The Dictionary class supports TryGetValue using an out parameter and bool return type.

Succinc<T> should provide a the following extension method:

Option<TValue> Dictionary<TKey, TValue>.TryGetValue(TKey key)

It should return none if the key doesn't exist and Option<TValue>.Some if it does.

DavidArno commented 7 years ago

v2.3.0 released.