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.

Curried JavaScript functions

12 pointsby juvennabout 15 years ago

4 comments

dugmartinabout 15 years ago
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>
d0mabout 15 years ago
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 未加载
Spreadsheetabout 15 years ago
I have a question about "it" in ML. How is it useful?
shawndumasabout 15 years ago
I thought this was a partial.