A Typeclass Primer for OO People
summary
Explains how typeclasses attach functions to types with concrete code: Scala and Haskell implementations that differ in resolution and coherence, demos that build a word counter using Monoids for merging frequency maps and JSON codecs that encode/decode types as functions, shows where things break (Java Optional map violating functor composition, Set/hashcode issues), uses QuickCheck-style law tests to find bugs, and reports which implementations actually work and which edge cases surprise.
AI-written summary · about
chapters (16)
- 0:00Start
- 0:17Path of Enlightenment
- 1:22Common Structures
- 4:07Grouping Functions
- 4:59Mapable Interface
- 5:32Elm Code
- 5:59Ependymal Interface
- 6:45Json Encoding
- 8:52Mapable Implementation for a Linked List
- 10:30Mapable and Functor
- 12:22Java Eight Optional
- 16:36Floating Points
- 17:39Jason Encoding
- 27:32Automated Log Checking
- 30:51Difference between a Statement and Expression
- 31:43Distinction between a Function and the Value
related talks
45mA practical introduction to Category Theory
48mCategory Theory: You Already Know It
01h 15mA Crash Course in Category Theory
01h 52mIsomorphic Reasoning: Counting with Types Part 3
02h 28mIsomorphic Reasoning: Counting with Types Part 2
33mApplying Functional Programming Patterns
46mChasing Arrows, in categories containing functors and monads
40mFunctors, in Theory and in Practice!
