<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Currying in JavaScript</title>
	<atom:link href="http://ajaxian.com/archives/currying-in-javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/currying-in-javascript</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Andy Kant</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247627</link>
		<dc:creator>Andy Kant</dc:creator>
		<pubDate>Wed, 28 Feb 2007 18:49:02 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247627</guid>
		<description>blah that got destroyed

function add() {
  var sum = 0;
  for (var i = 0; i &lt; arguments.length; i++) sum += arguments[i];
  return sum;
}

add(1, 2); // returns 3
add(1, 2, 3, 4, 5); // returns 15</description>
		<content:encoded><![CDATA[<p>blah that got destroyed</p>
<p>function add() {<br />
  var sum = 0;<br />
  for (var i = 0; i &lt; arguments.length; i++) sum += arguments[i];<br />
  return sum;<br />
}</p>
<p>add(1, 2); // returns 3<br />
add(1, 2, 3, 4, 5); // returns 15</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Kant</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247626</link>
		<dc:creator>Andy Kant</dc:creator>
		<pubDate>Wed, 28 Feb 2007 18:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247626</guid>
		<description>@Hang On a Sec

In JavaScript, arguments is an object that exists in every function that is basically an iterable array of the passed arguments.

function add() {
  var sum = 0;
  for (var i = 0; i </description>
		<content:encoded><![CDATA[<p>@Hang On a Sec</p>
<p>In JavaScript, arguments is an object that exists in every function that is basically an iterable array of the passed arguments.</p>
<p>function add() {<br />
  var sum = 0;<br />
  for (var i = 0; i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hang On a Sec</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247619</link>
		<dc:creator>Hang On a Sec</dc:creator>
		<pubDate>Wed, 28 Feb 2007 15:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247619</guid>
		<description>I must be blind, but where is &quot;arguments&quot; getting set at?</description>
		<content:encoded><![CDATA[<p>I must be blind, but where is &#8220;arguments&#8221; getting set at?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Animal</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247617</link>
		<dc:creator>Animal</dc:creator>
		<pubDate>Wed, 28 Feb 2007 11:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247617</guid>
		<description>Not much newsworthy there really!

You&#039;ve posted functionality like Ext&#039;s createDelegate (but a little less capable - createDelegate can insert your override argument list at a certain point in the real argument list if you don&#039;t want your argument list to completely take over).

That&#039;s one of my favourite functions in that library, and ultra useful for things like creating callback functions to handle DWR responses.

http://localhost:8080/ext/docs/output/Function.html#createDelegate

Ext has other Function extensions too. (And it deletes them from Function&#039;s prorotype on page unload just for the buggy browsers out there)</description>
		<content:encoded><![CDATA[<p>Not much newsworthy there really!</p>
<p>You&#8217;ve posted functionality like Ext&#8217;s createDelegate (but a little less capable &#8211; createDelegate can insert your override argument list at a certain point in the real argument list if you don&#8217;t want your argument list to completely take over).</p>
<p>That&#8217;s one of my favourite functions in that library, and ultra useful for things like creating callback functions to handle DWR responses.</p>
<p><a href="http://localhost:8080/ext/docs/output/Function.html#createDelegate" rel="nofollow">http://localhost:8080/ext/docs/output/Function.html#createDelegate</a></p>
<p>Ext has other Function extensions too. (And it deletes them from Function&#8217;s prorotype on page unload just for the buggy browsers out there)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247616</link>
		<dc:creator>Theo</dc:creator>
		<pubDate>Wed, 28 Feb 2007 08:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247616</guid>
		<description>Alex, thanks for clearing that out. I was absolutely sure it was a partial, and since the only time I have come across the concept of currying is when reading the MochiKit documentation on partial, which says &quot;this is not currying&quot; I was a bit confused.

Partial is fantastic, curry I don&#039;t understand. Could it be said that the partial above could be the result of a curry? That is, does a curry function spit out functions that have a similar effect to a partial?</description>
		<content:encoded><![CDATA[<p>Alex, thanks for clearing that out. I was absolutely sure it was a partial, and since the only time I have come across the concept of currying is when reading the MochiKit documentation on partial, which says &#8220;this is not currying&#8221; I was a bit confused.</p>
<p>Partial is fantastic, curry I don&#8217;t understand. Could it be said that the partial above could be the result of a curry? That is, does a curry function spit out functions that have a similar effect to a partial?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cdude</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247606</link>
		<dc:creator>cdude</dc:creator>
		<pubDate>Tue, 27 Feb 2007 21:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247606</guid>
		<description>is this not the same as prototype&#039;s bind?</description>
		<content:encoded><![CDATA[<p>is this not the same as prototype&#8217;s bind?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Russell</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247603</link>
		<dc:creator>Alex Russell</dc:creator>
		<pubDate>Tue, 27 Feb 2007 18:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247603</guid>
		<description>I don&#039;t *really* want to split hairs, but this isn&#039;t a curry, this is a partial. it&#039;s still highly useful, and I think we&#039;ll actually be removing Dojo&#039;s curry() in favor of a new partial() function at some point. That said, the difference is that curry() functions traditionally return *accumulators*, not direct application functions. The accumulators return new &quot;partials&quot; for every call to the curry or previous accumulator that doesn&#039;t meet the entire arity of the function (as originally declared).

Regards</description>
		<content:encoded><![CDATA[<p>I don&#8217;t *really* want to split hairs, but this isn&#8217;t a curry, this is a partial. it&#8217;s still highly useful, and I think we&#8217;ll actually be removing Dojo&#8217;s curry() in favor of a new partial() function at some point. That said, the difference is that curry() functions traditionally return *accumulators*, not direct application functions. The accumulators return new &#8220;partials&#8221; for every call to the curry or previous accumulator that doesn&#8217;t meet the entire arity of the function (as originally declared).</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin Diaz</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247600</link>
		<dc:creator>Dustin Diaz</dc:creator>
		<pubDate>Tue, 27 Feb 2007 17:11:06 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247600</guid>
		<description>Always a pleasure seeing one of my posts on Ajaxian. You rock Dion. Curried functions are everywhere in JavaScript so I figured it would be a nice and simple little task to write and share my own curry function. And obviously as you can tell, many other people have gone down this same path and its enlightening to &lt;a href=&quot;http://www.google.com/search?q=javascript+curry&quot; rel=&quot;nofollow&quot;&gt;see&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Always a pleasure seeing one of my posts on Ajaxian. You rock Dion. Curried functions are everywhere in JavaScript so I figured it would be a nice and simple little task to write and share my own curry function. And obviously as you can tell, many other people have gone down this same path and its enlightening to <a href="http://www.google.com/search?q=javascript+curry" rel="nofollow">see</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bhasker V Kode</title>
		<link>http://ajaxian.com/archives/currying-in-javascript/comment-page-1#comment-247593</link>
		<dc:creator>Bhasker V Kode</dc:creator>
		<pubDate>Tue, 27 Feb 2007 14:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2155#comment-247593</guid>
		<description>Ive posted about my experiments with currying ,including  a stress test that reveals that currying in javascript is best avoided for larger recursions.
http://bosky101.blogspot.com/2006/10/edited-currying-in-javascript-stress.html


Having a curried UI function might well be an overkill . Instead i have another function called the IdempotentEvent which might be most suited for UI and DOM hacking . Its over at :

http://bosky101.blogspot.com/2007/02/adding-idempotent-event-handling-to.html

Keep Clicking,
Bhasker V Kode</description>
		<content:encoded><![CDATA[<p>Ive posted about my experiments with currying ,including  a stress test that reveals that currying in javascript is best avoided for larger recursions.<br />
<a href="http://bosky101.blogspot.com/2006/10/edited-currying-in-javascript-stress.html" rel="nofollow">http://bosky101.blogspot.com/2006/10/edited-currying-in-javascript-stress.html</a></p>
<p>Having a curried UI function might well be an overkill . Instead i have another function called the IdempotentEvent which might be most suited for UI and DOM hacking . Its over at :</p>
<p><a href="http://bosky101.blogspot.com/2007/02/adding-idempotent-event-handling-to.html" rel="nofollow">http://bosky101.blogspot.com/2007/02/adding-idempotent-event-handling-to.html</a></p>
<p>Keep Clicking,<br />
Bhasker V Kode</p>
]]></content:encoded>
	</item>
</channel>
</rss>

