Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Select/SelectMany Result methods to perform do-notation like operation via LINQ #541

Closed
wants to merge 1 commit into from

Conversation

PNZeml
Copy link
Contributor

@PNZeml PNZeml commented May 2, 2024

This one address same problem from a proposal in #535.

var result = await (
    from one in Result.Success(1)
    from two in Result.Success(2)
    from three in Task.FromResult(Result.Success(3))
    select one + two + three
);

Assert(result.Value, 6);

@PNZeml PNZeml closed this May 2, 2024
@PNZeml
Copy link
Contributor Author

PNZeml commented May 2, 2024

Sorry, didn't see this feature already implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant