A Parliament of Functors

March 30th 2018 17:30 - 18:20

When we talk about functors in Haskell or other functional languages that support them, we're talking about types that have certain sorts of operations -- functorial operations -- defined over them. But what is this *functoriality* in general? Definitions that you may find in books or around the internet focus on the mathematical definition, coming from category theory, and it can be difficult to relate those definitions to something useful for everyday programming, or, on the other hand, they may describe functors as being "like containers" or wrappers, which is not such a bad place to start but can be misleading.
We won't talk about what a category is in this talk, and we won't rely on any container or wrapper analogies. Instead, we'll explore the common features of functors, from the basic structure represented by the Functor typeclass of Haskell, through monoidal functors, "double" functors (Bifunctor, Profunctor), and "backward" functors (contravariance). The goal will be to develop an intuition for the landscape of the functorial forest, by finding and analyzing the commonalities, to gain a new perspective on this family of algebras, and in particular to demystify covariance and contravariance.

Julie Moronuki avatar
Julie Moronuki

Author: Haskell Programming from First Principles and Joy of Haskell. Linguist. Teacher.


This website uses cookies. By continuing to browse you agree to this and Conferize's terms of service.