Applicative Functors
Unlike monads, which came into programming straight from category theory, applicative functors have their origins in programming. McBride and Paterson introduced applicative functors as a programming...
View ArticleF-Algebras
This is part 24 of Categories for Programmers. Previously: Comonads. See the Table of Contents. We’ve seen several formulations of a monoid: as a set, as a single-object category, as an object in a...
View ArticleProfunctor Parametricity
The Free Theorem for Ends In Haskell, the end of a profunctor p is defined as a product of all diagonal elements: forall c. p c c together with a family of projections: pi :: Profunctor p => forall...
View ArticleFree Monoidal Profunctors
Abstract: I derive free monoidal profunctors as fixed points of a higher order functor acting on profunctors. Monoidal profunctors play an important role in defining traversals. The beauty of category...
View ArticleRecursion Schemes for Higher Algebras
Abstract The use of free monads, free applicatives, and cofree comonads lets us separate the construction of (often effectful or context-dependent) computations from their interpretation. In this paper...
View ArticleTrading FunLists at a Bazaar with Yoneda
There is a lot of folklore about various data types that pop up in discussions about lenses. For instance, it’s known that FunList and Bazaar are equivalent, although I haven’t seen a proof of that....
View ArticleOpen Season on Hylomorphisms
Yes, it’s this time of the year again! I started a little tradition a year ago with Stalking a Hylomorphism in the Wild. This year I was reminded of the Advent of Code by a tweet with this succint C++...
View ArticlePromonads, Arrows, and Einstein Notation for Profunctors
I’ve been working with profunctors lately. They are interesting beasts, both in category theory and in programming. In Haskell, they form the basis of profunctor optics–in particular the lens library....
View ArticleMonoidal Catamorphisms
I have recently watched a talk by Gabriel Gonzalez about folds, which caught my attention because of my interest in both recursion schemes and optics. A Fold is an interesting abstraction. It...
View ArticleTeaching optics through conspiracy theories
This post is based on the talk I gave at Functional Conf 2022. There is a video recording of this talk. Disclaimers Data types may contain secret information. Some of it can be extracted, some is...
View Article