Skip to content
0:00 / 0:00

#reduce#fold#recursion

A Million Ways to Fold in JS

InfoQ

234K subscribers • 65 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Brian Lonsdorf
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

24K views10 years ago2 recommendations

Programming languagesComputer scienceJavaScriptFunctional programmingAlgorithms

Brian Lonsdorf explores functional alternatives to loops in JavaScript, diving deep into recursion, catamorphisms, anamorphisms, and folds.

Loops are bullshit. Loops are bullshit. Hey, and we have tail-call elimination es6, which means recursion is on the menu. I'll provide as many alternatives to those dreadful loops as I can. Impress your loved ones with catamorphisms, anamorphisms, bifunctors, fix points, f-algebras, co-recursion, and more. Plus, if I'm not too lazy, i'll show how it all applies to Streams - no promises though (so many puns!) Brian Lonsdorf is a faux academic seeking attention.

Why it's here

2 people recommend this

What people say. Recommended for its deep dive into the concept of reduce and fold operations beyond basic usage.

u/zuko_in r/Clojure • Recommends

On “Interesting uses of reduce?”

This isn't Clojure, but you may still enjoy it because it goes quite deep into the concept of `reduce` (aka `fold`): link to this video In case it gives you some other ideas or avenues to explore.

u/the_evergrowing_foolin r/Clojure • Recommends

On “Interesting uses of reduce?”

Watch this talk (is in js though).