title: Scala Function Composition
body: <pre><code>def t[A] = (l:List[A]) =&gt; l tail
  def r[A] = (r:List[A]) =&gt; r reverse
  def tr[A] :List[A] =&gt; List[A] = t compose r
  
  tr(List(1,2,3,4))
  </code></pre>
  
  <blockquote>
    <p>List(3, 2, 1)</p>
  </blockquote>
  
  <p>As expected.</p>
  
  <p>But somehow, every variant (with several variations of type annotations) I have tried on </p>
  
  <pre><code>def tr = tail compose reverse
  </code></pre>
  
  <p>fails (not found - value tail). I am missing something obvious, but I am stuck.</p>