-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: +EitherT.liftRedeemK #4441
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Bikeshedding: the name "redeem" bothers me a bit, because the traditional redeem
takes two functions. This is closer to adaptError
, but that doesn't can't the type of the error like this does. It's also similar to leftMap
, but then it loses its connection to error handling. So my ideas aren't quite right either.
I think I like it, but I wonder if anyone else has a better idea for a name.
|
Details
|
Ye, I also try to add that extra function that maps A => B, but that's still kind of different from original redeem since it only has one result type. though maybe it is still worth it since it will be more similar to the original one and keep the naming consistent. |
Maybe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for bringing yet another variant for naming, but I like Ross's idea of proceeding with some form of adaptError
🤷🏻
I think i'd prefer |
I found it is very handy for example lift from Future to EitherT but want to get rid of Throwable, just like attempt and redeem