~/talk

Recursion, Iteration & JavaScript: A love story

Talkat ngAtlanta 2019 · on Thursday, 2019-01-10· [javascript]

Claims JavaScript can unite recursion and iteration: custom Iterables let recursive logic drive intuitive for‑loops, and tail calls let recursion run without growing the stack. Builds an iterable tree by implementing Symbol.iterator with a generator using yield / yield so a for loop yields node values; that part works and reads like the recursive version. Rewrites recursion into a tail form with an accumulator so engines with tail call optimization* (Safari, Node6+flags) handle 30,000 depth; engines without it still hit stack overflow.

AI-written summary · about

  1. 0:00Start
  2. 12:51Iterative tree traversal
  3. 14:38Iterables
  4. 20:18Recursion
  5. 26:34Tail Call Optimization
~/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.