|
|
|
|
|
by spicebox
906 days ago
|
|
Monads don’t compose, effects do. ‘IO a’ works great until until you need to add another effect, for example ‘Maybe’. Then you need to bring in monad transformers and create your own monad combining the two, then rewrite all your code to lift the effects from one monad to the other. And you have to do this every time you want to add a new effect. |
|
This is even worse in Rust, which requires you to have a separate implementation for every effect as well (since it doesn't have higher kinded types)