title: Type of (.) . (.)
body: <p>How can one infer that the type of <code>(.) . (.)</code> is <code>(b -&gt; c) -&gt; (a -&gt; a1 -&gt; b) -&gt; a -&gt; a1 -&gt; c</code>?</p>
  
  <p>(What I thought and which is obviously wrong is: The type of <code>(.)</code> is <code>(t2-&gt;t3) -&gt; (t1-&gt;t2) -&gt; t1 -&gt; t3</code>, which should be the same as <code>(t2-&gt;t3) -&gt; [(t1-&gt;t2) -&gt; (t1-&gt;t3)]</code> (using also <code>[]{}</code> for readability). Hence, the type of <code>(.) . (.)</code> should be something like <code>{(b2-&gt;b3) -&gt; [(b1-&gt;b2) -&gt; (b1-&gt;b3)]} -&gt; {(a2-&gt;a3) -&gt; [(a1-&gt;a2) -&gt; (a1-&gt;a3)]}</code> which requires <code>(b2-&gt;b3)</code> to match <code>[(a1-&gt;a2) -&gt; (a1-&gt;a3)]</code>... </p>
  
  <p>But this never leads to the desired type. </p>
  
  <p>What is wrong?</p>