O'Reilly logo

Get Programming with Haskell by Will Kurt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 28. A peek at the Applicative type class: using functions in a context

After reading lesson 28, you’ll be able to

  • Build an application that handles missing data
  • Extend the power of the Functor type class with the Applicative type
  • Use Applicative to use one data model in many contexts

In the preceding lesson, you learned how the Functor type class allows you to perform computation inside a container such as List or a context such as Maybe and IO. The key method behind Functor is fmap (more commonly, the <$> operator), which works just like map on a list. In this lesson, you’ll work with a more powerful type class called Applicative. The Applicative type class extends the power of Functor by allowing you to use functions that are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required