So, I’ve spent a considerable amount of time today reading various tutorials and descriptions about monads in Haskell. I think I’ve got it figured out. To summarize:
- Monads are not magical things which somehow allow side effects without actually allowing side effects, which is how most Haskell literature seems to paint it. The I/O monad has side effects aplenty, and it doesn’t even pretend to do things like keeping around the state of the universe.
- Monads are actually containers with a special way of operating on the contents. This allows the programmer to string together … Continue Reading