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
Js 37 try monad #48
Js 37 try monad #48
Conversation
… (recover/recoverWith...) - expanded a little bit Partial Functions to allow flatMap over them and improved pattern matching functions signatures
@raulraja could you review please? I reviewed it and I think that it's Ok. |
Looks great! Another handy OP here would be the catamorphism via
|
In any case this LGTM and we should consider adding our own foldable ops like the ones in Scalaz if SwiftZ doesn't already do so. |
@raulraja You're right. Swiftz includes Foldable. I'll take a look on how to conform Try to the fold methods, or to implement one of our own if Swiftz's ones don't make sense. I'm going to create a separate issue for this :). Thanks! |
This PR contains our first basic implementation of the Try monad, with the following features:
This PR also includes a couple of modifications to PartialFunctions to allow some functionality to Try's recover and recoverWith functions.
Could you please review, @anamariamv? Also, it'd be nice to have your thoughts on this, @raulraja
Thanks!