<a href="http://www.haskell.org/haskellwiki/Monomorphism_restriction">http://www.haskell.org/haskellwiki/Monomorphism_restriction</a><br><br><div class="gmail_quote">On 17 June 2012 08:13, Morel Pisum <span dir="ltr">&lt;<a href="mailto:morel.pisum@googlemail.com" target="_blank">morel.pisum@googlemail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Let&#39;s define a function in GHCi:<br>
<br>
&gt; Prelude&gt; let f s n = and (map (==s) n)<br>
&gt; Prelude&gt; :t f<br>
&gt; f :: Eq a =&gt; a -&gt; [a] -&gt; Bool<br>
<br>
This is fine. But when I define this function using lambda notation, I<br>
get this<br>
<br>
&gt; Prelude&gt; let f = \s n -&gt; and (map (==s) n)<br>
&gt; Prelude&gt; :t f<br>
&gt; f :: () -&gt; [()] -&gt; Bool<br>
<br>
which is really weird.<br>
<br>
Why does this happen?<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><br clear="all"><div><br></div>-- <br>Ozgur Akgun<br>