TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Higher-Order Functions in JavaScript

136 点作者 zatkin超过 10 年前

9 条评论

drderidder超过 10 年前
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 未加载
zatkin超过 10 年前
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 未加载
killtheliterate超过 10 年前
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.
osconfused超过 10 年前
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>
amelius超过 10 年前
&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 未加载
VieElm超过 10 年前
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 未加载
leeoniya超过 10 年前
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>
romaniv超过 10 年前
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#.
arcticf0x超过 10 年前
great book!