TryPick
Applies the given chooser
function to successive elements, returning the first result of an option value that IsSome
.
Returns an Option<T>
that IsNone
if no such element exists.
Similar to Pick
, but in this case the value still in an option context and this function doesn't raises any exception.
Parameters | Returns |
Func<T, Option<T2>> chooser IEnumerable<T> source | T2 |
Usage
Getting the double of first odd number in a collection
When there is no element that satisfies the condition
Last updated