In Eclipse Scala sheet I get error for:
(-1 until 5).foreach {i => println(i)}
Errors are:
Type ';' expected but ')' found
illegal start of simple expression
but if I delete the "." after (-1 until 5) I won't get any error:
(-1 until 5) foreach {i => println(i)}
why is that?