Speaker Deck

Comonads in Haskell

by David Overton

Published May 29, 2014 in Programming

Comonads are the category-theoretic dual of monads. While monads have been found to be a very useful design pattern for structuring programs in functional languages, such as Haskell, comonads have so far failed to gain much traction. In this talk we will look at what comonads are and how they are defined in Haskell, comparing them with the Haskell definition of monads. We will then look at some specific examples of comonads and how they can be used in practical programs.

We will assume basic knowledge of Haskell, including the Monad class and common instances. No knowledge of category theory will be required.

Other Presentations by this Speaker