Scala 3, Programming Scala.
supported. If you want everything on one line like this, you’ll have to use braces: val fold1b = xs.foldLeft(0) {(x, y) => x + y} // val fold1b: Int = 45 So, if you really dislike colons, you’ll be able to avoid them when passing anonymous functions to methods. What about import statements? scala>