Scala 3, Programming Scala.
fold1a: Int = 45 val fold2a = xs.foldLeft(0): (x, y) => x + y // val fold2a: Int = 45 Okay, so we can put the argument list on the same line as the :, but what about the single expression for the body? // scala> val fold2b = xs.foldLeft(0): (x, y) => x + y // | // -- Error: