scala> val x = """alpha | | omega""" x: String = alpha omega scala> val y = """abc | |def | |ghi | """.stripMargin y: String = abc def ghi scala> val z = { | def square(x: Int) = x * x | val xs = List(1, 2, 3) | square(xs) | } :8: error: type mismatch: found : scala.collection.immutable.List[Int](xs) required: Int square(xs) ^ scala> val z = { | def square(x: Int) = x * x | val xs = List(1, 2, 3) | xs.map(square) | } z: scala.collection.immutable.List[Int] = List(1, 4, 9) scala> :quit