Scala code:
val value = Some("100")
value.foreach( println(_.toInt) ) // !!! can't be compiled
The error message is:
missing parameter type for expanded function ((x$1)=>x$1.toInt)
Why it can't be compiled?
PS: And the following code is valid:
value.foreach( _.toInt )
value.foreach( x => println(x.toInt) )