<?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: Function Currying in Scala</title>
	<atom:link href="http://www.codecommit.com/blog/scala/function-currying-in-scala/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codecommit.com/blog/scala/function-currying-in-scala</link>
	<description>(permanently in beta)</description>
	<lastBuildDate>Sun, 29 Aug 2010 20:01:44 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Horst Makitta</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-4957</link>
		<dc:creator>Horst Makitta</dc:creator>
		<pubDate>Thu, 01 Apr 2010 21:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-4957</guid>
		<description>Well a bit late to the game, but maybe i get an answer?

As a Java-Programmer i am interested in Scala &#039;cause it presents all those functional advanced concepts in a very readable manner (unlike Lisp). Or let&#039;s say in a form that&#039;s much easier to grasp when used to Java.

However i still fail to see what the difference in currying and using partially applied functions is (besides having to specify the types of the underscores): Both appear to return the exact same function signatures.

You example with process, using partially applied functions:
def process[A](filter:A=&gt;Boolean,list:List[A]):List[A] = {
  lazy val recurse = process(filter, _:List[A])
...

Everything else remains the same and it works as expected:
scala&gt; process(even,numbersAsc)
res11: List[Int] = List(2, 4)

scala&gt; process(even,numbersDesc)
res12: List[Int] = List(4, 2)

So what is the reason for the special curryable form?</description>
		<content:encoded><![CDATA[<p>Well a bit late to the game, but maybe i get an answer?</p>
<p>As a Java-Programmer i am interested in Scala &#8217;cause it presents all those functional advanced concepts in a very readable manner (unlike Lisp). Or let&#8217;s say in a form that&#8217;s much easier to grasp when used to Java.</p>
<p>However i still fail to see what the difference in currying and using partially applied functions is (besides having to specify the types of the underscores): Both appear to return the exact same function signatures.</p>
<p>You example with process, using partially applied functions:<br />
def process[A](filter:A=&gt;Boolean,list:List[A]):List[A] = {<br />
  lazy val recurse = process(filter, _:List[A])<br />
&#8230;</p>
<p>Everything else remains the same and it works as expected:<br />
scala&gt; process(even,numbersAsc)<br />
res11: List[Int] = List(2, 4)</p>
<p>scala&gt; process(even,numbersDesc)<br />
res12: List[Int] = List(4, 2)</p>
<p>So what is the reason for the special curryable form?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Landei</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3314</link>
		<dc:creator>Landei</dc:creator>
		<pubDate>Thu, 20 Mar 2008 09:27:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3314</guid>
		<description>Very cool post, you have a new reader :-)</description>
		<content:encoded><![CDATA[<p>Very cool post, you have a new reader <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3313</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Thu, 20 Mar 2008 08:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3313</guid>
		<description>Very true, but it would still be nice to get the inference whenever possible.</description>
		<content:encoded><![CDATA[<p>Very true, but it would still be nice to get the inference whenever possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Florian Hars</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3312</link>
		<dc:creator>Florian Hars</dc:creator>
		<pubDate>Thu, 20 Mar 2008 07:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3312</guid>
		<description>The type of the arguments of add5 can&#039;t be inferred in general, because there might be overloaded add methods in scope with argument types (Int, Float, Float) and (Int, Boolean, String). Which one should add(5,_,_) resolve to?</description>
		<content:encoded><![CDATA[<p>The type of the arguments of add5 can&#8217;t be inferred in general, because there might be overloaded add methods in scope with argument types (Int, Float, Float) and (Int, Boolean, String). Which one should add(5,_,_) resolve to?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3308</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Wed, 19 Mar 2008 01:51:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3308</guid>
		<description>Yes, I am misusing the term &quot;dynamic programming&quot;.  The problem is that there doesn&#039;t seem to be a very good term to describe that particular concept.  Dynamic typing is close, but insufficient.  Meta-programming perhaps, but meta-programming is possible with entirely static constructs.  We really need a new term which encompasses all of the modern techniques which go along with languages like Ruby and Groovy.</description>
		<content:encoded><![CDATA[<p>Yes, I am misusing the term &#8220;dynamic programming&#8221;.  The problem is that there doesn&#8217;t seem to be a very good term to describe that particular concept.  Dynamic typing is close, but insufficient.  Meta-programming perhaps, but meta-programming is possible with entirely static constructs.  We really need a new term which encompasses all of the modern techniques which go along with languages like Ruby and Groovy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abulafia</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3307</link>
		<dc:creator>abulafia</dc:creator>
		<pubDate>Wed, 19 Mar 2008 00:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3307</guid>
		<description>Hi, 

i think the term &quot;dynamic programming&quot; is  misused in this article. You probably mean something like dynamic typing but not http://en.wikipedia.org/wiki/Dynamic_programming.

abu</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>i think the term &#8220;dynamic programming&#8221; is  misused in this article. You probably mean something like dynamic typing but not <a href="http://en.wikipedia.org/wiki/Dynamic_programming" rel="nofollow">http://en.wikipedia.org/wiki/Dynamic_programming</a>.</p>
<p>abu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3302</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Tue, 18 Mar 2008 15:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3302</guid>
		<description>Unfortunately, you can&#039;t *exactly* curry it in Java.  At least, not Java 6 or earlier.  If closures make it into Java 7, we&#039;re going to see a lot more examples of this sort of thing for Java itself, not just derivative languages.</description>
		<content:encoded><![CDATA[<p>Unfortunately, you can&#8217;t *exactly* curry it in Java.  At least, not Java 6 or earlier.  If closures make it into Java 7, we&#8217;re going to see a lot more examples of this sort of thing for Java itself, not just derivative languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: German B.</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3300</link>
		<dc:creator>German B.</dc:creator>
		<pubDate>Tue, 18 Mar 2008 12:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3300</guid>
		<description>Good post!
So I guess you can curry a Java method, which is nice.</description>
		<content:encoded><![CDATA[<p>Good post!<br />
So I guess you can curry a Java method, which is nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3295</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Tue, 18 Mar 2008 00:32:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3295</guid>
		<description>Good point, Alex.  Currying is the correct term.  I tend to use &quot;function currying&quot; because it just sounds more clear.  Not really to disambiguate, but to keep the terms associated for the sake of the uninitiated.</description>
		<content:encoded><![CDATA[<p>Good point, Alex.  Currying is the correct term.  I tend to use &#8220;function currying&#8221; because it just sounds more clear.  Not really to disambiguate, but to keep the terms associated for the sake of the uninitiated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Blewitt</title>
		<link>http://www.codecommit.com/blog/scala/function-currying-in-scala/comment-page-1#comment-3294</link>
		<dc:creator>Alex Blewitt</dc:creator>
		<pubDate>Tue, 18 Mar 2008 00:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/scala/function-currying-in-scala#comment-3294</guid>
		<description>I think most of the time this is just referred to as &#039;currying&#039; rather than &#039;function currying&#039;. You can&#039;t really curry a constant ;-) Otherwise, good post.</description>
		<content:encoded><![CDATA[<p>I think most of the time this is just referred to as &#8216;currying&#8217; rather than &#8216;function currying&#8217;. You can&#8217;t really curry a constant <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Otherwise, good post.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
