<div dir="ltr">That&#39;s good enough. Thanks!<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Mar 31, 2013 at 11:08 AM, Franco <span dir="ltr">&lt;<a href="mailto:franco00@gmx.com" target="_blank">franco00@gmx.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Ovidiu D &lt;ovidiudeac &lt;at&gt; <a href="http://gmail.com" target="_blank">gmail.com</a>&gt; writes:<br>

<br>
&gt;<br>
&gt; I have the following code:<br>
&gt;<br>
&gt; f1 :: String -&gt; String<br>
&gt;<br>
&gt; f2 :: IO String -&gt; IO ()<br>
&gt; f2 a = do<br>
&gt;    b &lt;- a<br>
&gt;    putStr $ f1 b<br>
&gt;<br>
&gt; How can I write the function f2 in a point-free style?<br>
&gt;<br>
<br>
</div>maybe<br>
<br>
f2 = (=&lt;&lt;) (putStrLn . f1)<br>
<br>
I still prefer the non point-free but clearer<br>
<br>
f2 = a &gt;&gt;= (putStrLn . f1)<br>
<br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br></div></div>