~/talk

Code by Shape

Talkat Scala World 2019 · 2019-09-11..09-13· [design-collaboration]
github:andyscott
slides:none on file

Shows how folding simple ADTs (Either, Option, List) maps to commuting diagrams and then to code: implements a recursive, not stack-safe foldRight for lists, derives the functor view 1 + A and the Option[(A, tail)] encoding, and packs the initial value plus binary op into a single algebra and coalgebra pair. Reconstructs a hylomorphism that reproduces foldRight by mapping and composing but notes composing ana+cata is inefficient while tracing the diagram perimeter gives the efficient recursion scheme.

AI-written summary · about

  1. 0:00Introduction
  2. 1:18Talk goals and category theory
  3. 2:44Spatial intuition for code
  4. 4:53Commutative diagrams
  5. 6:43Folding lists to diagrams
  6. 9:13Folding Either and co-products
  7. 12:46Folding Option and terminal objects
  8. 15:32Option folding with diagrams
  9. 17:43Understanding foldRight in Scala
  10. 24:37From foldRight to Hilah morphisms
  11. 30:54Recursion schemes and intuition
  12. 34:10Summary
  13. 35:35Q&A
~/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.