<?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: Point-Free style: What is it good for?</title>
	<atom:link href="http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/feed/" rel="self" type="application/rss+xml" />
	<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/</link>
	<description>What would OJ do?</description>
	<lastBuildDate>Wed, 17 Mar 2010 08:58:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scala: Post-Functional, Post-Modern, or Just Perl++?</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1640</link>
		<dc:creator>Scala: Post-Functional, Post-Modern, or Just Perl++?</dc:creator>
		<pubDate>Sun, 07 Mar 2010 03:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1640</guid>
		<description>[...] paragon of this way of programming is point-free programming, where you are quite literally building up a mega-function that describes how your program works, [...]</description>
		<content:encoded><![CDATA[<p>[...] paragon of this way of programming is point-free programming, where you are quite literally building up a mega-function that describes how your program works, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1560</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Tue, 17 Nov 2009 01:26:23 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1560</guid>
		<description>Hi DK,&lt;br&gt;&lt;br&gt;The short answer is: Yes, you should use the same method that I used above :) There might be some other tricks that you have to follow along the way, but refactoring to point-free is essentially the same process (which is what lambdabot does).&lt;br&gt;&lt;br&gt;Have you tried to change those functions to point-free ?&lt;br&gt;&lt;br&gt;Cheers&lt;br&gt;OJ</description>
		<content:encoded><![CDATA[<p>Hi DK,</p>
<p>The short answer is: Yes, you should use the same method that I used above <img src='http://buffered.io/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':)' class='wp-smiley' /> There might be some other tricks that you have to follow along the way, but refactoring to point-free is essentially the same process (which is what lambdabot does).</p>
<p>Have you tried to change those functions to point-free ?</p>
<p>Cheers<br />OJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DK</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1559</link>
		<dc:creator>DK</dc:creator>
		<pubDate>Sun, 15 Nov 2009 10:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1559</guid>
		<description>Hi, Thank you very much for such a great tutorial. I am also a noob to Haskell. &lt;br&gt;I have a question: how will you point free the following ones?&lt;br&gt;f x y z = (x y) y z &lt;br&gt;g x y z = x z (y z)&lt;br&gt;filter p = foldr (x xs -&gt; if p x then (x:xs) else xs) []&lt;br&gt;&lt;br&gt;Of course, I can do it using some tool like lambdadot, but is there any method that I can follow and do it manually?&lt;br&gt;&lt;br&gt;Thanks.&lt;br&gt;DK</description>
		<content:encoded><![CDATA[<p>Hi, Thank you very much for such a great tutorial. I am also a noob to Haskell. <br />I have a question: how will you point free the following ones?<br />f x y z = (x y) y z <br />g x y z = x z (y z)<br />filter p = foldr (x xs -&gt; if p x then (x:xs) else xs) []</p>
<p>Of course, I can do it using some tool like lambdadot, but is there any method that I can follow and do it manually?</p>
<p>Thanks.<br />DK</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1393</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Sat, 11 Jul 2009 22:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1393</guid>
		<description>@Petro: don&#039;t worry mate, we are all here to learn! I&#039;m certainly no expert.

If you see &quot;(Num a)=&gt; a&quot; that means that &quot;a&quot; has to be an instance of the class &quot;Num&quot;. This is how you enforce certain type constraints on your function parameters.

The reason this solves the problem is because Haskell&#039;s type-inference system chooses one of the Num types for us (Integer in this case). Putting the type signature in prevents it from doing that.

Hope that helps!</description>
		<content:encoded><![CDATA[<p>@Petro: don&#8217;t worry mate, we are all here to learn! I&#8217;m certainly no expert.</p>
<p>If you see &#8220;(Num a)=&gt; a&#8221; that means that &#8220;a&#8221; has to be an instance of the class &#8220;Num&#8221;. This is how you enforce certain type constraints on your function parameters.</p>
<p>The reason this solves the problem is because Haskell&#8217;s type-inference system chooses one of the Num types for us (Integer in this case). Putting the type signature in prevents it from doing that.</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petronilho</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1392</link>
		<dc:creator>Petronilho</dc:creator>
		<pubDate>Sat, 11 Jul 2009 17:05:26 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1392</guid>
		<description>Thanks for the assistance, OJ. Don&#039;t kill me, lol.
I&#039;m just learning the language, and I didn&#039;t put the funtion type signature.

I don&#039;t even know what the =&gt; means yet. :P</description>
		<content:encoded><![CDATA[<p>Thanks for the assistance, OJ. Don&#8217;t kill me, lol.<br />
I&#8217;m just learning the language, and I didn&#8217;t put the funtion type signature.</p>
<p>I don&#8217;t even know what the =&gt; means yet. :P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1389</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Fri, 10 Jul 2009 02:13:49 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1389</guid>
		<description>&lt;p&gt;There is most definitely a way of doing it (there&#039;s probably many ways). Off the top of my head I came up with this:&lt;/p&gt;
&lt;pre lang=&quot;haskell&quot;&gt;double :: (Num a) =&gt; a -&gt; a
double = sum . take 2 . repeat

dub :: (Num a) =&gt; a -&gt; a
dub = ((*)2)&lt;/pre&gt;
&lt;p&gt;Note that the type signatures are important. I would argue this is a case where point-free doesn&#039;t add any value. It&#039;s not like it&#039;s difficult to understand what your function is doing. Use of point-free isn&#039;t a catch-all solution. You should use it where it makes sense.&lt;/p&gt;
&lt;p&gt;Wait for the more able Haskellers to see your question. They&#039;ll no doubt come up with a better solution :)&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>There is most definitely a way of doing it (there&#8217;s probably many ways). Off the top of my head I came up with this:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">double <span style="color: #339933; font-weight: bold;">::</span> <span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Num</span> a<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=&gt;</span> a <span style="color: #339933; font-weight: bold;">-&gt;</span> a
double <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">sum</span> <span style="color: #339933; font-weight: bold;">.</span> <span style="font-weight: bold;">take</span> <span style="color: red;">2</span> <span style="color: #339933; font-weight: bold;">.</span> <span style="font-weight: bold;">repeat</span>
&nbsp;
dub <span style="color: #339933; font-weight: bold;">::</span> <span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Num</span> a<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=&gt;</span> a <span style="color: #339933; font-weight: bold;">-&gt;</span> a
dub <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#40;</span><span style="color: green;">&#40;</span><span style="color: #339933; font-weight: bold;">*</span><span style="color: green;">&#41;</span><span style="color: red;">2</span><span style="color: green;">&#41;</span></pre></div></div>

<p>Note that the type signatures are important. I would argue this is a case where point-free doesn&#8217;t add any value. It&#8217;s not like it&#8217;s difficult to understand what your function is doing. Use of point-free isn&#8217;t a catch-all solution. You should use it where it makes sense.</p>
<p>Wait for the more able Haskellers to see your question. They&#8217;ll no doubt come up with a better solution <img src='http://buffered.io/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':)' class='wp-smiley' /> </p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petronilho</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1388</link>
		<dc:creator>Petronilho</dc:creator>
		<pubDate>Fri, 10 Jul 2009 01:42:59 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1388</guid>
		<description>Okay, so I want to make a function that doubles its number argument.
The non-point-free way accepts Integer or Double.
The point-free way works with Integer but doesn&#039;t work on Double.</description>
		<content:encoded><![CDATA[<p>Okay, so I want to make a function that doubles its number argument.<br />
The non-point-free way accepts Integer or Double.<br />
The point-free way works with Integer but doesn&#8217;t work on Double.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1381</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Thu, 02 Jul 2009 21:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1381</guid>
		<description>&lt;p&gt;@Philipp: Cheers mate. It took me a while to get what it was I like about Point-Free, now I know why too :)&lt;/p&gt;
&lt;p&gt;Thanks for the comment.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>@Philipp: Cheers mate. It took me a while to get what it was I like about Point-Free, now I know why too <img src='http://buffered.io/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':)' class='wp-smiley' /> </p>
<p>Thanks for the comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philipp Meier</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1380</link>
		<dc:creator>Philipp Meier</dc:creator>
		<pubDate>Thu, 02 Jul 2009 12:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1380</guid>
		<description>Great stuff. I always liked point-free. Now I know why.</description>
		<content:encoded><![CDATA[<p>Great stuff. I always liked point-free. Now I know why.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OJ</title>
		<link>http://buffered.io/2009/06/27/point-free-style-what-is-it-good-for/comment-page-1/#comment-1378</link>
		<dc:creator>OJ</dc:creator>
		<pubDate>Wed, 01 Jul 2009 11:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://buffered.io/?p=724#comment-1378</guid>
		<description>&lt;p&gt;
&lt;p&gt;@Frederick: Wow, that was a really interesting stuff! Cheers. This stuff is very new to me, so information like this is really valuable.&lt;/p&gt;
&lt;p&gt;It&#039;s good to see that what I&#039;m talking has actually got some history. It validates the learning in some way and makes me feel good about what I&#039;ve written.&lt;/p&gt;
&lt;p&gt;Thanks for taking the time to comment :)&lt;/p&gt;
&lt;/p&gt;</description>
		<content:encoded><![CDATA[</p>
<p>@Frederick: Wow, that was a really interesting stuff! Cheers. This stuff is very new to me, so information like this is really valuable.</p>
<p>It&#8217;s good to see that what I&#8217;m talking has actually got some history. It validates the learning in some way and makes me feel good about what I&#8217;ve written.</p>
<p>Thanks for taking the time to comment <img src='http://buffered.io/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
