-
Notifications
You must be signed in to change notification settings - Fork 227
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 recover
and recoverWith
#41
Comments
Thanks for filing this! I’m of two minds. Against:
For:
On the balance, I think it’d make a fine addition. My only request is that the documentation for Thank you kindly! |
Fixed by #42. I’ll tag in a moment. |
🎉 ❤️ |
You’re very welcome 😄 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would you be open to adding
recover
andrecoverWith
toResult
. They're similar tomap
andflatMap
except that they are given closures that run when theResult
failed and then provide an opportunity to make it succeed. The implementation ofrecover
would actually be identical to the??
operation.If you are favorable of this change, I'd like to make a PR.
For more context, see Thomvis/BrightFutures#49, where we're discussing to replace a custom Result implementation with this library and identify the functions discussed here as the biggest missing piece.
The naming comes from Scala (http://www.scala-lang.org/api/2.10.1/index.html#scala.concurrent.Future), at least that's where I got it from.
The text was updated successfully, but these errors were encountered: