-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Provide an idiomatic way to flatten List<Result> #80
Comments
Just to confirm, I think we have support for 1. already with List<Result<...>>
When we "lift" this into Result<List<>>, what do we do to the 2nd (the failure one?)? Just ignore them? |
Provide an error handler fn perhaps, user can do whatever they want in there with the exception. |
Then I think we might be able to expand the lift() functionality then? |
Close with new version |
From kittinunf/fuel#805:
It'd be nice to able to do the following:
List<Result<Foo, FuelError>>
intoResult<List<Foo>, FuelError>
. If any of theResult
s is an error, the finalResult
is an error too, sort of anAND
.List<Result<Foo, FuelError>>
intoResult<List<Foo>, FuelError>
. If any of theResult
s is a success, the finalResult
is a success too, sort of anOR
.The text was updated successfully, but these errors were encountered: