3 ms·
Deriving the Y Combinator in JavaScript in 7 Steps
- Swannie 16y agoYet no mention of lambda calculus (or combinatory logic) anywhere in the article.
- mathgladiator 16y agoNor that it requires untyped lambdas.
- igstan 16y agoI haven't mentioned anything about those subjects for a few reasons: 1. I don't know that much about them yet; 2. the post would have gotten pretty lengthy and hairy; 3. I didn't meant the post to be a comprehensive tutorial on fixed point combinators. While I think I understand lambda calculus enough as to write a little introductory blog post, I can't say the same for combinatory logic.
- timtadh 16y agoOn the plus side it was an extremely lucid explanation of how the Y combinator is derived. Usually articles on the Y combinator get bogged down with jargon and terminology. By using simple terms your explanation was very readable. If someone wants to learn more of the theory it is one google away. If someone wants to learn how someone might have originally come up with such a device, you article is an excellent starting point.
- aboodman 16y agoAgree - haters gonna hate. I really enjoyed the simple, lingo-free derivation.
- arethuza 16y agoAn excellent introduction to a topic that normally only gets introduced after wading through a lot of lambda calculus - not that there is anything wrong with the more formal approach for CS course but it is nice to see these things receiving a bit more visibility (and nice that it is in JavaScript).
- btilly 16y agoFor an alternate and very different explanation, see mine at http://www.mail-archive.com/boston-pm@mail.pm.org/msg02716.html http://www.mail-archive.com/boston-pm@mail.pm.org/msg02716.h.... It does it in 3 steps.
- thomas11 16y agoYour explanation is great! As a third option, if you'd like to have the relevant CS terminology, see Matt Might's derivation, also in JavaScript, at http://matt.might.net/articles/implementation-of-recursive-fixed-point-y-combinator-in-javascript-for-memoization/ http://matt.might.net/articles/implementation-of-recursive-f....
- igstan 16y agoThanks for the link. Really nice resource on CS stuff.
- deleted 16y ago[deleted]