-
-
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
Add method to perform natural transformation of underlying Monad in Monad Transformers #1724
Comments
There also seems to be #1644 which adds a Edit: I see now, that EitherT already has a function called transform, so we might need to find a different solution. This makes it very difficult to find a common name. We could either duplicate the function with the common name in |
This might be calling a higher order Functor, mentioned in #1644 |
also related, @edmundnoble has a |
This seems to be an exact duplicate of #1713. |
I've found myself in this position quite often and I think it might be very useful to be able to change the underlying Monad of a Monad Transformer.
For example in
OptionT
:We could add this to all Monad Transformers currently in cats, i.e.
The name is debatable, other suggestions one might come up with are:
mapF
,mapK
, or justtransform
.Edit: Just realized
Kleisli
already has a method that does exactly this calledtransform
so we should probably stick to that.The text was updated successfully, but these errors were encountered: