fork download
  1. object Main extends App {
  2. val hoge = (1 to 3 map { a =>
  3. 1 to 3 map { b =>
  4. a + b
  5. }
  6. }).flatten
  7.  
  8. System.out.println(hoge)
  9. }
Success #stdin #stdout 0.41s 381952KB
stdin
Standard input is empty
stdout
Vector(2, 3, 4, 3, 4, 5, 4, 5, 6)