Skip to content

Add Option.traverseAsync and Option.sequenceAsync #297

@tw0po1nt

Description

@tw0po1nt

Is your feature request related to a problem? Please describe.
Over the course of implementing a feature, I noticed an API that I needed that is missing - Option.sequenceAsync.

Describe the solution you'd like
I'd like Option.traverseAsync and Option.sequenceAsync to be implemented. Their type signatures would be as follows:

// traverseAsync: ('a -> Async<'b>) -> 'a option -> Async<'b option>
// sequenceAsync:  Async<'a> option -> Async<'a option>

Describe alternatives you've considered
Add these functions as a local extension

I'd gladly open a PR for this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions