Description: This is part 2 of Monads: Your App As A Function. In the previous post we started looking at monads, and summarized that their core purpose is to …
This is part 2 of Monads: Your App As A Function .
In the previous post we started looking at monads, and summarized that their core purpose is to transport values or computations along a call chain. (Functional programming is all about inputs and outputs. ) To enable this behavior, we said monads have the following properties:
We concluded the article by saying that this is not the entire truth. What we have neglected so far are the laws that govern unit and flatMap, and that have to hold true for a type that looks like a monad, to actually be a monad.