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.

Higher-Order Functions in JavaScript

136 pointsby zatkinabout 10 years ago

9 comments

drderidderabout 10 years ago
I recently read this, worked through the examples, and was pleasantly surprised at the depth and quality. Subsequently we recommended it to our 800+ member meetup group as the top learning resource for new JS programmers. The content is enlightening and enjoyable and could be just the thing for reaching a breakthrough in understanding about functional programming.
评论 #9108115 未加载
zatkinabout 10 years ago
It&#x27;s also worth mentioning Lodash[1] if you&#x27;re new to this idea of functional programming. They have an awesome description of each function name and they&#x27;re very closely aligned to the functional terminology.<p>[1] - <a href="http://lodash.com/docs" rel="nofollow">http:&#x2F;&#x2F;lodash.com&#x2F;docs</a>
评论 #9107108 未加载
评论 #9107114 未加载
评论 #9107150 未加载
评论 #9110901 未加载
killtheliterateabout 10 years ago
I love this book for it&#x27;s, ah, eloquent and inclusive way of describing more advanced JS topics. Definitely of value, even for the more experienced JS dev.
osconfusedabout 10 years ago
On the topic of functional JavaScript, a few interesting articles and books I have been reading that have helped shed more light on this subject matter. I particularly enjoyed the Functional JavaScript book [2].<p>[1] - <a href="http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf" rel="nofollow">http:&#x2F;&#x2F;www.cse.chalmers.se&#x2F;~rjmh&#x2F;Papers&#x2F;whyfp.pdf</a><p>[2] - <a href="http://shop.oreilly.com/product/0636920028857.do" rel="nofollow">http:&#x2F;&#x2F;shop.oreilly.com&#x2F;product&#x2F;0636920028857.do</a><p>[3] - <a href="http://stackoverflow.com/questions/36504/why-functional-languages" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;36504&#x2F;why-functional-lang...</a><p>[4] - <a href="http://scott.sauyet.com/Javascript/Talk/2014/01/FuncProgTalk/#slide-0" rel="nofollow">http:&#x2F;&#x2F;scott.sauyet.com&#x2F;Javascript&#x2F;Talk&#x2F;2014&#x2F;01&#x2F;FuncProgTalk...</a>
ameliusabout 10 years ago
&gt; The second relies on two external functions and is one line long.<p>&gt; console.log(sum(range(1, 10)));<p>&gt; Which one is more likely to contain a bug?<p>I&#x27;d say the second one. Because the first one is totally transparent. The second one relies on functions I can&#x27;t see. Especially the &quot;range&quot; function may cause problems because here it generates the full range, including both delimiters, unlike the range function in e.g. python.<p>EDIT: functional programming is extremely useful, but I don&#x27;t think this example really highlights the most important advantages.
评论 #9107009 未加载
评论 #9107823 未加载
评论 #9110988 未加载
评论 #9107499 未加载
VieElmabout 10 years ago
In ES6 there are iterables that one uses `for...of` with. Rauschmayer of 2ality has said that `for...of` should be used instead of forEach and I wonder how that will affect composability in functional programming. I quite like the concept of iteratables and creating data structures that can make use of for of and generators. I just have thought about how that affects functional style programming.
评论 #9108705 未加载
leeoniyaabout 10 years ago
in case anyone missed it, it&#x27;s by the author of CodeMirror [1], Acorn, Tern, etc. [2]. He also contributes to Rust.<p>[1] <a href="https://github.com/codemirror/codemirror" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;codemirror&#x2F;codemirror</a><p>[2] <a href="https://github.com/marijnh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;marijnh</a>
romanivabout 10 years ago
The theory is good, but the specifics of JS syntax, the type system, and the lack of support from the standard library make functional programming much less fun to use than in proper functional languages or even C#.
arcticf0xabout 10 years ago
great book!