Hi Oscar,<br><br>Define<br><br>&nbsp; &nbsp; result = (.)<br><br>Then &#39;(result f) g&#39; applies f to the result part of a function g.&nbsp; That&#39;s what you want when negating the result of not.&nbsp; For (==), you want to negate the result of the result, so you&#39;d instead say &#39;(result.result) not (==)&#39;.&nbsp; Keep composing result for deeper applications.<br>
<br>If you want to edit/transform the first or second part of a pair instead of the result of a function, then you&#39;d use &#39;first&#39; or &#39;second&#39; in place of &#39;result&#39;.<br><br>If you think of f (here f=not) as an &quot;semantic editor&quot; (transformer) of values, then &#39;result&#39;, &#39;first&#39;, and &#39;second&#39; are &quot;semantic editor combinators&quot;, which can be composed together arbitrarily.&nbsp; See <a href="http://conal.net/blog/semantic-editor-combinators">http://conal.net/blog/semantic-editor-combinators</a> .<br>
<br>&nbsp;&nbsp; - Conal<br><br><div class="gmail_quote">2008/12/26 Oscar Picasso <span dir="ltr">&lt;<a href="mailto:oscarpicasso@gmail.com">oscarpicasso@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I can write:<br>*Main&gt; let yes = not . not<br>*Main&gt; :t yes<br>yes :: Bool -&gt; Bool<br><br>But not:<br>*Main&gt; let isNotEqual = not . (==)<br><br>&lt;interactive&gt;:1:23:<br>&nbsp;&nbsp;&nbsp; Couldn&#39;t match expected type `Bool&#39;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; against inferred type `a -&gt; Bool&#39;<br>&nbsp;&nbsp;&nbsp; Probable cause: `==&#39; is applied to too few arguments<br>&nbsp;&nbsp;&nbsp; In the second argument of `(.)&#39;, namely `(==)&#39;<br>&nbsp;&nbsp;&nbsp; In the expression: not . (==)<br><br>

Why?<br><font color="#888888"><br>Oscar<br><br></font></blockquote></div><br>