either
Function Signature
(onSome : 'T -> Async<'output>) -> (onNone : Async<'output>) -> (input : Async<'T option>) -> Async<'output>Examples
Example 1
AsyncOption.either (fun x -> async { x * 2 }) (async { 0 }) (AsyncOption.some 5)
// async { 10 }Example 2
AsyncOption.either (fun x -> x * 2) (async { 0 }) None
// async { 0 }Last updated