How is the following "parenthesized"?
val words = List("foo", "bar", "baz")
val phrase = "These are upper case: " + words map { _.toUpperCase } mkString ", "
Is it the same as
val words = List("foo", "bar", "baz")
val phrase = "These are upper case: " + words.map(_.toUpperCase).mkString(", ")
In other words, do implied dots (".") and parentheses have the same precedence as the real ones?
Is the first version the same as
val words = List("foo", "bar", "baz")
val phrase =
"These are upper case: " + (words map { _.toUpperCase } mkString ", ")