Update: detailed answer to the more general problem at http://stackoverflow.com/questions/1181533/what-are-the-precise-rules-for-when-you-can-omit-parenthesis-dots-braces-fu, thank you for the answers!
The following works:
scala> List(1,2,3) filter (_ > 1) reduceLeft(_ + _)
res65: Int = 5
And also the following:
scala> List(1,2,3).filter(_ > 1).foldLeft(0)(_ + _)
res67: Int = 5
But not this sytax:
scala> List(1,2,3) filter (_ > 1) foldLeft(0)(_ + _)
<console>:10: error: 0 of type Int(0) does not take parameters
List(1,2,3) filter (_ > 1) foldLeft(0)(_ + _)
^
What is a suggested fix?