An Introduction to Functional Programming in Go
summary
Shows how Go uses generics and closures to treat functions as stateful objects: builds an accumulator closure that carries its own private state, a tiny DSL for validating inputs, and a currying-style adder. Demonstrates recursion limits (stack overflows when naive), implements a typed Y-combinator with types to enable anonymous recursion, and wraps that in a memoized factorial machine that caches results so repeated calls (e.g. 100!) avoid recomputation — all working in Go.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:28Functional programming for Go
- 4:40Generics in Go
- 7:14Functions as math in Go
- 10:30Closures and state
- 16:34Closures as objects
- 18:19Factorials and recursion
- 23:01Higher-order functions
- 31:30Recursion limits in Go
- 37:53Memoization in Go
- 41:49Y combinator in Go
- 56:30Typed Y combinator
- 1:00:43Summary








