TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Deriving the Y Combinator in JavaScript

49 pointsby shamdasanialmost 7 years ago

6 comments

18nleungalmost 7 years ago
Hi! Author here, and glad to see my writeup on HN.<p>I’m a JS developer by trade, but I’ve recently started exploring FP&#x2F;Haskell and came across the Y Combinator. The Y writeups currently online that I read were wonderful for a seasoned Haskell programmer, but I thought it would be great to explore the concept from a more FP beginner-friendly lens, and through a more familiar language - JavaScript.<p>I hope this exploration is helpful, and feel free to leave any questions or comments you may have below!
评论 #17468078 未加载
评论 #17468042 未加载
评论 #17468453 未加载
评论 #17467979 未加载
dnscoalmost 7 years ago
Jim Weirich&#x27;s 2012 Ruby Conf talk is also a great introduction to the Y Combinator and Lambda Calculus.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=FITJMJjASUs" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=FITJMJjASUs</a>
dangalmost 7 years ago
This is an article, not a Show HN. Please read the rules: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;showhn.html" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;showhn.html</a>.
Retraalmost 7 years ago
Of course, if your language doesn&#x27;t support recursion it probably doesn&#x27;t have first-class functions either. It&#x27;s pretty trivial to implement recursion if you can pass a function pointer around.
评论 #17468172 未加载
mchahnalmost 7 years ago
Maybe a stupid question ...<p>Isn&#x27;t passing a function to itself kind of like recursion?
评论 #17468037 未加载
anothergoogleralmost 7 years ago
Also <a href="http:&#x2F;&#x2F;www.crockford.com&#x2F;javascript&#x2F;little.html" rel="nofollow">http:&#x2F;&#x2F;www.crockford.com&#x2F;javascript&#x2F;little.html</a> (scroll down)