apply
CancellableValueTask<('a -> 'b) option> -> CancellableValueTask<'a option> -> CancellableValueTask<'b option>Examples
// string -> int
let characterCount (s: string) = s.LengthExample 1
let result =
CancellableValueTaskOption.some "foo" // CancellableValueTask<string option>
|> CancellableValueTaskOption.apply (CancellableValueTaskOption.some characterCount) // CancellableValueTask<int option>
// cancellableValueTask { Some 3 }Example 2
let result =
CancellableValueTask.singleton None // CancellableValueTask<string option>
|> CancellableValueTaskOption.apply (CancellableValueTaskOption.some characterCount) // CancellableValueTask<int option>
// cancellableValueTask { None }Example 3
Last updated