A Practical Introduction To Category Theory
summary
Shows concrete code adapted from the Cats library and maps category concepts to Scala types: demonstrates monoid = integers with + and 0 by example, explains Option.map = functor using Option/Future/Try/List as containers, presents applicative = pure + combine (independent box combination) and flatMap/for-comprehension = monad sequencing to collapse nested boxes. Emphasizes laws used (identity, associativity, composition), explains when order matters (monad) versus when it doesn’t (applicative), and points to Cats docs for implementations.
AI-written summary · about
chapters (13)
- 0:00Introduction and motivation
- 3:01Why category theory matters
- 5:36What is a category
- 7:03Category theory laws
- 10:19Monoids in programming
- 14:24Functors explained
- 18:22Applicatives in Scala
- 21:37Monads and flatMap
- 25:59Summary of key concepts
- 27:46Beyond the basics
- 28:30Practical takeaways
- 29:12Further learning resources
- 30:38Q&A and closing
