Going Higher
summary
Covers three concrete capabilities and tradeoffs: higher-order functions let code accept behavior—for example merge with conflict resolver that takes a function to combine values and implements left/right/max/union choices; folds generalize to any datatype via Church encoding and pattern functors so one fold works for many shapes; higher-kinded types enable abstraction over containers and power libraries like functor/applicative/monad and traverse :: (Applicative f, Traversable t) => (a -> f b) -> t a -> f (t b); higher-rank polymorphism enables lenses and generic traversal but sacrifices full type inference and needs annotations.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:43General Advice to Higher-Order Functions
- 6:40Round Types
- 7:05Higher-Order Functions
- 19:20Pattern Functors
- 21:20Random Predicative Polymorphism
- 23:12Declarations
- 32:45Generic Programming
related talks
32mRecursion schemes with Higherkindness
11mHigher order Abstractions
54mCategory Theory Through Functional Programming (part 3/3)
25mHandling Higher-Order Effectful Operations with Judgemental Monadic Laws
45mFunctional Programming bits and pieces
42mHigher-Order Functions and Functional Interfaces: for the challenges of clean, cohesive code
56mAn introduction to recursion schemes
38mRefactoring Recursion
