object Main extends App { val list = List(1, 2, 3, 4, 5) val list2 = List(6, 7, 8, 9, 10) println( for{ x <- list y <- list2 } yield x ^ y )}
Standard input is empty
List(7, 6, 9, 8, 11, 4, 5, 10, 11, 8, 5, 4, 11, 10, 9, 2, 3, 12, 13, 14, 3, 2, 13, 12, 15)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!