Category Theory Through Functional Programming (part 2/3)
summary
Explains concrete equivalences and code-level shapes: the category of endofunctors is monoidal under composition with Identity as unit, monads are monoid objects in End(C) and translate to Haskell as join :: m (m a) -> m a and return :: a -> m a, naturality follows from parametricity, and monoidal functors = applicative functors so applicative operations implement the monoidal structure. Shows examples (List, Maybe, Either, Identity, Void), uses Haskell types and polymorphic functions, and notes composed monads fail to be monads unless a distributive law exists.
AI-written summary · about
chapters (8)
- 0:00Introduction to monads
- 1:03Natural transformations
- 7:14Monoid objects
- 15:45Monoidal categories
- 24:51Monoidal functors
- 35:27Category of endofunctors
- 42:22Defining monads
- 53:32Comonads and conclusions
related talks
51mCategory Theory for the Working Hacker
02h 24mCategory Theory Track
42mA pragmatic introduction to Category Theory
42mWhat did category theory do for us?
01h 31mCategory Theory Track by Bartosz Milewski Part 2
01h 29mCategory Theory Track by Bartosz Milewski Part 1
01h 11mCategories for the Working Hacker
46mScale By The Bay 2018 Unconference: Runar Bjarnason
