What did category theory do for us?
summary
Argues that category theory explains why common typeclass methods are "liftings" and why their behavior reduces to two laws, identity and composition laws, so mistakes (an unlawful map/flatMap) produce subtle bugs; shows concrete correspondences like Kleisli composition = monad laws and applicative via map2; recommends category tools when writing generic, type-constructor libraries (free monad, recursion schemes, church encoding / free monad / tagless final), and gives a small example rewriting filter as liftOpt to reveal its laws.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:06Functional programming basics
- 8:47Type class laws and bugs
- 13:07Category theory fundamentals
- 18:08General constructions in libraries
- 22:24Type constructor libraries
- 27:04Category theory limits
- 29:31When to use patterns
- 33:14Tagless final vs free monad
- 36:24Rewriting filter as lift opt
- 41:27Q&A
related talks
51mCategory Theory for the Working Hacker
57mApplied category theory and abstract algebra
42mA pragmatic introduction to Category Theory
40mA Pragmatic Introduction to Category Theories
52mCategory Theory Through Functional Programming (part 1/3)
41mCategory Theory in Life
56mCategory Theory Through Functional Programming (part 2/3)
02h 24mCategory Theory Track
