title: Scala foreach strange behaviour
body: <p>I want to iterate over a list of values using a beautiful one-liner in Scala.</p>
  
  <p>For example, this one works well:</p>
  
  <pre><code>scala&gt; val x = List(1,2,3,4)
  x: List[Int] = List(1, 2, 3, 4)
  
  scala&gt; x foreach println
  1
  2
  3
  4
  </code></pre>
  
  <p>But if I use the placeholder <code>_</code>, it gives me an error:</p>
  
  <pre><code>scala&gt; x foreach println(_ + 1)
  &lt;console&gt;:6: error: missing parameter type for expanded function ((x$1) =&gt;x$1.$plus(1))
         x foreach println(_ + 1)
                           ^
  </code></pre>
  
  <p>Why is that? Can't compiler infer type here?</p>