Lesson 6: More than a sum
- Sum sometimes
- Zippable containers
- Alignable functors
- Exercise instances
- Align and merge
- Coming up
In the previous lesson we introduced the
Bifunctor class and some canonical instances, for
(,). We also discussed the notion of covariance and why the function type cannot be a
Bifunctor. It’s easy to feel that this class is slightly pointless. But hold on, we’re not quite done.
In this lesson, we’ll consider a datatype that is something like
(,) and what its
Bifunctor looks like and what else this type can do for us and how those things are related to its bifunctoriality.