Y: The Most Beautiful Idea in Computer Science explained in JavaScript
In this post, we will talk about one of the most beautiful ideas in computer science: the Y-Combinator. And no, I’m not talking about the VC firm in Silicon ...
In this post, we will talk about one of the most beautiful ideas in computer science: the Y-Combinator . And no, I'm not talking about the VC firm in Silicon Valley , even though this post will explain why they've got this name. Put in simple terms, the Y-Combinator (also known as the fixed-point combinator) is a way of doing recursion in a language that does not explicitly supports it . Let's say you want to implement a recursive factorial function . In JavaScript, for example, you could simply do this: const factorial = n => n === 0 ? 1 : n * factorial (n - 1 ); But what if you couldn't use
Explore this link on the map →saved by
related reading
- The Y Combinator (Slight Return): mvanier — LiveJournalmvanier.livejournal.com
- Lambda calculus - Wikipediaen.wikipedia.org
- adventures in uncertainty: An Introduction to Recursion Schemesblog.sumtypeofway.com
- I never understood this obsession with lambda calculus or ycombinator. If most o... | Hacker Newsnews.ycombinator.com
- 🙂 Y Combinator for Non-programmersycombinator.chibicode.com
- CSC 151 - Recursion over Numberseikmeier.sites.grinnell.edu
- Everything is Fertilenickcammarata.com
- why y combinator made all the differencecindywu.org
- CSC 151 - Tail Recursioneikmeier.sites.grinnell.edu
- A Neighborhood of Infinity: Reverse Engineering Machines with the Yoneda Lemmablog.sigfpe.com
- combinators in Rubymooreniemi.github.io
- Reading 14: Recursionweb.mit.edu