Answer Posted / Sayyad Azaharuddin
que is a for comprehension construct in Scala that makes it easy to write complex iterations and collections transformations. Here's an example:nnval list = List(1, 2, 3, 4)nval evenNumbers = for (num <- list if num % 2 == 0) yield numnnevenNumbers will output List(2, 4)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers