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

Result.Combine question #424

Open
macpak opened this issue Jul 10, 2022 · 2 comments
Open

Result.Combine question #424

macpak opened this issue Jul 10, 2022 · 2 comments

Comments

@macpak
Copy link

macpak commented Jul 10, 2022

Hi,

Is there a way to use Combine in such a way that a result of Combine contains valueses of two/more results passed into Combine ?
Imagine the code below

Result<string> result1 = GetName();
Result<int> result2 = GetAge();
Result.Combine(result1, result2).Bind(nameAndAge => ...)

Can I somehow use Result.Combine so that nameAndAge contains valueses of result1 and result2 (as a tuple, anonymous type, etc.) ?

@vkhorikov
Copy link
Owner

Unfortunately, there's no way to do so at the moment. I'm marking this is a a protentional enhancement, feel free to submit a PR.

@macpak
Copy link
Author

macpak commented Jul 16, 2022

@vkhorikov Just found that #342 solves what I was asking about.

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

No branches or pull requests

2 participants