Skip to content

Add AsyncOption.orElse and AsyncOption.orElseWith #306

@tw0po1nt

Description

@tw0po1nt

Is your feature request related to a problem? Please describe.
I noticed that this API exists in the Option module, but not here, and they would be useful to have.

Describe the solution you'd like
I'd like AsyncOption.orElse and AsyncOption.orElseWith to be implemented. Their type signatures would be as follows:

// orElse: (ifNone : Async<'value option>) -> (input : Async<'value option>) -> Async<'value option>
// orElseWith: (ifNoneFunc : unit -> Async<'value option>) -> (input : Async<'value option>) -> Async<'value option>

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

Additional context

I'd gladly open a PR for this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions