Chapter 13. A Fistful of Monads

When we first talked about functors in Chapter 7, you saw that they are a useful concept for values that can be mapped over. Then, in Chapter 11, we took that concept one step further with applicative functors, which allow us to view values of certain data types as values with contexts and use normal functions on those values while preserving the meaning of those contexts.

In this chapter, you’ll learn about monads, which are just beefed-up applicative functors, much like applicative functors are beefed-up functors.

Upgrading Our Applicative Functors

When we started off with functors, you saw that it’s possible to map functions over various data types using the Functor type class. The introduction to functors had us ...

Get Learn You a Haskell for Great Good! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.