~/talk

An Intuition for List Folds

Talkat Functional Conf 2019 · 2019-11-13..11-17· [functional-programming]
slides:none on file

Defines a cons list as nil or cons and gives precise rules: left fold is a loop used for sum, product, length, reverse (linear time by flipping cons), and fails on infinite lists; right fold replaces constructors so it implements map, append, flatten, filter, headOr and can work on infinite lists when the replacing function is lazy. Shows Haskell code, warns JVM foldr causes StackOverflow for large lists, and demonstrates sequence via foldr with lift-to-cons and return.

AI-written summary · about

  1. 0:00Start
  2. 12:03How Do You Reverse a List
  3. 21:01Appending to Lists
  4. 23:17Mapping a Function on a List
  5. 26:33Function Composition
  6. 27:22Flattening a List of Lists
  7. 29:50Favorite Functions
  8. 45:31Length Function
~/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.