Understand Monads
Monad is a fundamental concept in Haskell. Recently, I have reviewed them and made my mind clearer. Hence, I wrote down this blog. To understand them, we need to clearly understand some concepts, such as:
- understand the
do
notation syntax sugar and learn about how de-sugar it to>>=
format - understand the closures after de-sugaring
- type constructor
- understand how the
>>=
deals with the data held inside a monad - understand the runMonad function properly
- clarify the difference between monad in category(math) and the monad in haskell