|
|
|
|
|
by evanrmurphy
5579 days ago
|
|
Hmm! That's funny, I thought I was "getting" monads better after reading this article (as someone who doesn't already have a firm grasp of monads, of course). You see, I already sensed that monads: - were a way that you could sort of simulate side effects using pure functions - had to do with the type signatures of functions What I gleaned from the article is that monads: - have to do with making functions composable - work by way of the abstractions bind and unit in order to make type signatures match Did the article harm my (lack of) understanding of monads? |
|
For a "state" monad, that calculation is maintaining/passing the state. For a "logging" monad, that calculation is maintaining the log. For an "error handling monad", that calculation is checking for and propagating errors.