Yes, same problem, and again I have no idea how to read the type<div><br></div><div><div>Prelude&gt; :t max. 3 2</div><div>max. 3 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>What does the type mean in plain english?</div><div><br></div><div>Daryoush</div><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 11:56 PM, Ramana Kumar <span dir="ltr">&lt;<a href="mailto:Ramana.Kumar@cl.cam.ac.uk" target="_blank">Ramana.Kumar@cl.cam.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Another experiment may be revealing:<br><br>:t 3 2<div class="HOEnZb"><div class="h5"><br><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Fri, Nov 16, 2012 at 7:46 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">I see the point with :t (.)  that <div><br></div><div>max.(+1) 2 2</div><div><br></div><div>is the same as </div><div>

<br>
</div><div>max. 3 2</div><div><br></div><div>Which is not what I want.</div><div><br></div><div>But I have no idea what the type signature of this expression mean now</div>
<div><br></div><div><div>Prelude&gt; :t max. 3 2</div><div>max. 3 2 :: (Ord b, Num a1, Num (a1 -&gt; a -&gt; b)) =&gt; a -&gt; b -&gt; b</div><div><br></div><div>Any idea?</div><span><font color="#888888"><div>

<br></div><div>Daryoush</div></font></span><div><div><div><br></div>
<br><div class="gmail_quote">On Thu, Nov 15, 2012 at 11:19 PM, Ramana Kumar <span dir="ltr">&lt;<a href="mailto:Ramana.Kumar@cl.cam.ac.uk" target="_blank">Ramana.Kumar@cl.cam.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



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"><div><div>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>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>

<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><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></div></div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Daryoush<br><br>Weblog:  <a href="http://onfp.blogspot.com/" target="_blank">http://onfp.blogspot.com/</a><br>
</div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Daryoush<br><br>Weblog:  <a href="http://onfp.blogspot.com/" target="_blank">http://onfp.blogspot.com/</a><br>
</div>