title: When does Scala need parameter types for anonymous and expanded functions?
body: <p>When does the Scala compiler really need the type information of parameters of anonymous functions?</p>
  
  <p>For instance, given this function:</p>
  
  <pre><code>def callOn[T,R](target: T, f: (T =&gt; R)) = f(target)
  </code></pre>
  
  <p>then I cannot use it like this:</p>
  
  <pre><code>callOn(4, _.toString)
    =&gt; error: missing parameter type for expanded function ((x$1) =&gt; x$1.toString)
  </code></pre>
  
  <p>and I have to specify</p>
  
  <pre><code>callOn(4, (_: Int).toString)
  </code></pre>
  
  <p>which is rather ugly. Why doesn't my example work, whereas method like map, filter, foldLeft, etc. on the collection classes don't seem to need this explicit type?</p>