either
Function Signature
(onValueSome : 'T -> Task<'output>)
-> (onValueNone : Task<'output>)
-> (input : Task<'T voption>)
-> Task<'output>Examples
Example 1
TaskValueOption.either (fun x -> task { x * 2 }) (task { 0 }) (TaskValueOption.valueSome 5)
// task { 10 }Example 2
TaskValueOption.either (fun x -> task { x * 2 }) (task { 0 }) ValueNone
// task { 0 }Last updated