~/talk

An Introduction to Recursion Schemes

Talkat f(by) 2020 · on Saturday, 2020-01-25· [scala, functional-programming]
slides:none on file

Live coding shows how list product and range move from loops to recursion then to cata and ana by factoring out the list into a type constructor F so the same code works for any recursion scheme. Uses Scala 2.13 unfold, a Cats-style Functor for F, and kind-projector-style types; exercises and solutions live on GitHub. Demonstrates composing cata and ana into a hylomorphism to implement factorial and frames quicksort as divide-and-conquer.

AI-written summary · about

  1. 0:00Introduction and disclaimer
  2. 0:45Naive solution for list multiplication
  3. 2:12Implementing with folds
  4. 3:00Generating range with unfold
  5. 5:21Introducing recursion schemes
  6. 6:04Implementing foldRight
  7. 9:50Lazy foldRight solution
  8. 11:15Implementing unfold
  9. 12:41Generalizing foldRight and unfold
  10. 15:25Factoring out data structures
  11. 17:07Defining recursion scheme steps
  12. 19:43Unfold steps and terminology
  13. 21:30Introducing pattern functor
  14. 23:03Abstracting with higher-kinded types
  15. 24:56Using functors in recursion
  16. 26:29Final foldRight implementation
  17. 27:40Introducing cata and ana
  18. 29:09Composing cata and ana
  19. 30:18Quicksort with hylomorphism
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.