Functors, Applicative Functors, and Traversables
This chapter leads us much further into Haskell’s hierarchy of type classes for type constructors: functors, applicative functors, and traversables.
We will introduce the three abstractions in turn as a generalization of particular list-related functionality: mapping, zipping, and mapping with zipping. These list functions provide a good intuition for the mechanics of the generalizations. However, for applicative functors, the notion of effectful computations provides a much better and more important intuition.
Effectful computations are computations that do not only (or necessarily) produce a result. They also do or can do something additional (such as logging, failing, or changing a mutable state) that somehow interacts with the context in which the computation takes place. This is called the (side) effect of the computation.
It is quite paradoxical. On the one hand, Haskell is called a purely functional programming...