Main.scala:2: error: expected class or object definition
val n = List(0, 3, 5, 6)
^
Main.scala:3: error: expected class or object definition
val a = n ++ n.reverse.map( 15 - _ )
^
Main.scala:4: error: expected class or object definition
val b = List.range(0, 15) diff a
^
Main.scala:5: error: expected class or object definition
def | = { s:List[Any] => "[" + s.mkString(", ") + "] " }
^
Main.scala:6: error: expected class or object definition
print(|(a)); println(|(b))
^
Main.scala:6: error: expected class or object definition
print(|(a)); println(|(b))
^
Main.scala:7: error: expected class or object definition
for(p <- 0 to 3) {
^
7 errors found
spoj: The program compiled successfully, but Main.class was not found.
Class Main should contain method: def main(args: Array[String]).