-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Is your feature request related to a problem? Please describe.
In #298, sequence and traverse were added for converting Option<Async<'T>> to Async<Option<'T>>, and similar for Result. I'd like to have those functions available for AsyncResult as well.
Describe the solution you'd like
I'd like there to be Option.sequenceAsyncResult and Option.traverseAsyncResult.
Could it be as simple as copying the sequenceAsync definition and replacing the async CE with a asyncResult CE?
Describe alternatives you've considered
My code uses
// previous stages that result in an option
|> Option.map ( // a function that outputs an Async<Result<Option<'ok>, 'error>> )
|> Option.sequenceAsync
|> Async.map Option.sequenceResult
and I don't think that's very nice :p (EDIT: possibly not even correct... I've changed it to using a match statement. But I think it's still worth having the sequence and traverse)
Additional context
N/A
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers