Lesson 2: You got monoids in my functors!

Contents
  • Applicative idioms
  • A different lift
  • An empty box
  • Tuple, monoid and functor
  • Coming up

In the previous lesson, we saw that there are times when you need the power of fmap except that your function is also embedded in the functorial context, and we learned that the typeclass that generalizes the solution to that problem is called Applicative. However, we’ve only scratched the surface of this typeclass so far. In this lesson, we will first get a deeper appreciation of the functoriality of applicatives, then we’ll give more attention to the other functions provided by this class (and/or derivable from those) and take a look at the connection between Applicative and monoids.

Sign up for access to the full page, plus the complete archive and all the latest content.