Scala underscore – ERROR: missing parameter type for expanded function

It expands to:

myStrings.foreach(println(x => x.toString))

You want:

myStrings.foreach(x => println(x.toString))

The placeholder syntax for anonymous functions replaces the smallest possible containing expression with a function.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)