Quantcast
Channel: Haskell –  Bartosz Milewski's Programming Cafe
Browsing latest articles
Browse All 58 View Live

Image may be NSFW.
Clik here to view.

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 Article


Image may be NSFW.
Clik here to view.

F-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 Article


Image may be NSFW.
Clik here to view.

Profunctor 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 Article

Free 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 Article

Recursion 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 Article


Trading 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 Article

Open 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 Article

Promonads, 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 Article


Monoidal 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 Article


Teaching 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
Browsing latest articles
Browse All 58 View Live