<div dir="ltr">Exactly. It is a convenience operator that lets you do:<div><br></div><div>f x $ g y $ h z</div><div><br></div><div>instead of</div><div><br></div><div>f x (g y (h z))</div><div><br></div><div><br></div><div style>
As for whether you should write:</div><div style><br></div><div style>foo = f . g</div><div style><br></div><div style>or</div><div style><br></div><div style>foo x = f $ g x</div><div style><br></div><div style>..go with whichever looks clearest and nicest to you. In most cases where you are just taking one argument and applying some functions to it, it&#39;s nice to omit the x. But in more complex cases, it may make your code harder to read and modify. See <a href="http://www.haskell.org/haskellwiki/Pointfree">http://www.haskell.org/haskellwiki/Pointfree</a> (and Problems with &quot;pointless&quot; style.)</div>
<div style><br></div><div style>I personally always use pointfree where I would&#39;ve required a lambda expression, e.g.:</div><div style><br></div><div style>f (g . h) y</div><div style><br></div><div style>instead of</div>
<div style><br></div><div style>f (\x -&gt; g $ h x) y</div><div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 12, 2013 at 10:23 PM, Emanuel Koczwara <span dir="ltr">&lt;<a href="mailto:poczta@emanuelkoczwara.pl" target="_blank">poczta@emanuelkoczwara.pl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Dnia 2013-02-12, wto o godzinie 22:09 +0100, Martin Drautzburg pisze:<br>
<div class="im">&gt; On Friday, 1. February 2013 23:02:39 Ertugrul Söylemez wrote:<br>
&gt;<br>
&gt; &gt;     (f . g) x = f (g x)<br>
&gt;<br>
&gt;<br>
&gt; so (f . g) x = f $ g x<br>
&gt;<br>
&gt; right?<br>
&gt;<br>
&gt; That looks like the two are pretty interchangeable. When would I prefer one<br>
&gt; over the other?<br>
&gt;<br>
&gt;<br>
<br>
</div>($) has lower precedence (it was introduced for that reason I belive).<br>
<br>
Prelude&gt; :info ($)<br>
($) :: (a -&gt; b) -&gt; a -&gt; b       -- Defined in GHC.Base<br>
infixr 0 $<br>
<br>
Please take a look at:<br>
<a href="http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.6.0.1/Prelude.html#v:-36-" target="_blank">http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.6.0.1/Prelude.html#v:-36-</a><br>
<br>