|
|
|
|
|
by ratww
1453 days ago
|
|
Monads themselves aren't really contagious, it's the actions that would otherwise have side-effects that are, and also the fact they have to be executed in sequence. This is also true for other things in other paradigms, such as async functions in javascript. This is a good thing, however. In imperative programming, you have invisible temporal coupling. In pure-FP you have the same coupling, but it's exposed. |
|
Then again, there are lots of monads, such as `Maybe` and `List`, where you can get values out. These aren't contagious at all.
I agree with you that this is a good thing. Effects show up in the type signature - and it's all about those effects and managing them.