Cover by Miran Lipovaca

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 14. For a Few Monads More

You’ve seen how monads can be used to take values with contexts and apply them to functions, and how using >>= or do notation allows you to focus on the values themselves, while Haskell handles the context for you.

You’ve met the Maybe monad and seen how it adds a context of possible failure to values. You’ve learned about the list monad and seen how it lets us easily introduce nondeterminism into our programs. You’ve also learned how to work in the IO monad, even before you knew what a monad was!

In this chapter, we’ll cover a few other monads. You’ll see how they can make your programs clearer by letting you treat all sorts of values as monadic ones. Further exploration of monads will also solidify your intuition ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required