sequenceAsync
Option.sequenceAsync
Namespace: FsToolkit.ErrorHandling
Function Signature:
Async<'a> option -> Async<'a option>
Note that sequence
is the same as traverse id
. See also Option.traverseAsync.
See also Scott Wlaschin's Understanding traverse and sequence.
Examples
Example 1
let a1 : Async<int option> =
Option.sequenceAsync (Some (Async.singleton 42))
// async { return Some 42 }
let a2 : Async<int option> =
Option.sequenceAsync None
// async { return None }
Last updated