You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may have overlooked a helper in either this or the standard library, but I end up finding this function useful, similar to requireSome but where the fallback is evaluated on demand.
letfromOption f =(unit -> 'a)-> option<'b>-> Result<'b,'a>function| Some value -> Ok value
| None -> Error(f ())
Is there an equivalent or would it make sense to add perhaps Result.requireSomeWith?
The text was updated successfully, but these errors were encountered:
I may have overlooked a helper in either this or the standard library, but I end up finding this function useful, similar to
requireSome
but where the fallback is evaluated on demand.Is there an equivalent or would it make sense to add perhaps
Result.requireSomeWith
?The text was updated successfully, but these errors were encountered: