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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Curried JavaScript functions

12 点作者 juvenn大约 15 年前

4 条评论

dugmartin大约 15 年前
Here is a great functional JavaScript library if you don't want to build it up yourself:<p><a href="http://osteele.com/sources/javascript/functional/" rel="nofollow">http://osteele.com/sources/javascript/functional/</a>
d0m大约 15 年前
Suggestion:<p>instead of this:<p>&#60;code&#62; function add (a,b,c){ if (arguments.length &#60; this.add.length) { return curry(this.add,arguments,this); } return a+b+c; } &#60;/code&#62;<p>we could have something like:<p>&#60;code&#62; function add (a,b,c) { return curry(arguments, 3, function (x,y,z) { return a+b+c; }; } &#60;/code&#62;<p>which is arguably simpler and cleaner. However, one extra closure is used.. maybe it makes it more complicated for some?<p>But, overall, pretty clear and interesting article :o
评论 #1296139 未加载
评论 #1295712 未加载
Spreadsheet大约 15 年前
I have a question about "it" in ML. How is it useful?
shawndumas大约 15 年前
I thought this was a partial.