Hi Daryoush,<br><br>I recommend you try these experiments first, and then reply back if you&#39;re still confused.<br><br>:t max<br><br>:t (+1)<br><br>:t max . (+1)<br><br>:t (+1) 2<br><br>:t (.)<br><div class="gmail_extra">

<br><br><div class="gmail_quote">On Fri, Nov 16, 2012 at 7:10 AM, Daryoush Mehrtash <span dir="ltr">&lt;<a href="mailto:dmehrtash@gmail.com" target="_blank">dmehrtash@gmail.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>I am having hard time understanding how removing the  outer parenthesis in</div><div><br></div><div>(max.(+1)) 2 2 </div><div><br></div><div>to </div><div><br></div><div>max.(+1) 2 2 </div><div><br></div><div>changes the meaning of expression.</div>


<div><br></div><div>My expectation was that &quot;max.(+1) takes two numbers and returns the max as defined in the type:</div><div><br></div><div><div>:t max.(+1)</div><div>max.(+1) :: (Ord b, Num b) =&gt; b -&gt; b -&gt; b</div>


</div><div><br></div><div><br></div><div><br></div><div>With parenthesis it does what I expect it to:</div><div><br></div><div><br></div><div>Prelude&gt; :t (max.(+1)) 2 2</div><div>(max.(+1)) 2 2 :: (Ord b, Num b) =&gt; b</div>


<div>Prelude&gt;  (max.(+1)) 2 2</div><div>3</div><div><br></div><div><br></div><div>But if I remove the parenthesis I get a beast that I have no idea what its type signature mean any more</div><div><br></div><div>Prelude&gt; :t (max.(+1)) 2 2</div>


<div>(max.(+1)) 2 2 :: (Ord b, Num b) =&gt; b</div><div>Prelude&gt; :t max.(+1) 2 2</div><div>max.(+1) 2 2 :: (Ord b, Num a1, Num (a1 -&gt; a -&gt; b)) =&gt; a -&gt; b -&gt; b</div><div><br></div><div><br></div><div>How did removal of parenthesis changed the meaning?      How do you interpret the type:  &quot;(Ord b, Num a1, Num (a1 -&gt; a -&gt; b)) =&gt; a -&gt; b -&gt; b&quot;?</div>


<div><br></div><div>Thanks</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div><br></div>-- <br>Daryoush<br><br>Weblog:  <a href="http://onfp.blogspot.com/" target="_blank">http://onfp.blogspot.com/</a><br>


</font></span><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>