December 2023
Intermediate to advanced
418 pages
9h 25m
English
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 ...
Read now
Unlock full access