Which one of the following options is equivalent to the code below? for { x <- 1 to 10 y <- 1 to 10 } yield (x,y)
Correct Answer: (1 to 10).flatMap( x => (1 to 10).map(y => (x,y)))
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Scala MCQ Questions