~/talk

An Introduction to Functional Programming in Go

Talkat GopherCon UK 2024 · 2024-08-14..08-16· [go, functional-programming]
slides:none on file

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

  1. 0:00Introduction
  2. 1:28Functional programming for Go
  3. 4:40Generics in Go
  4. 7:14Functions as math in Go
  5. 10:30Closures and state
  6. 16:34Closures as objects
  7. 18:19Factorials and recursion
  8. 23:01Higher-order functions
  9. 31:30Recursion limits in Go
  10. 37:53Memoization in Go
  11. 41:49Y combinator in Go
  12. 56:30Typed Y combinator
  13. 1:00:43Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.