Question: The code below is expected to display the numbers from 1 to 10, but it does not. Why?
- You cannot assign a sequence to a variable
- To produce result, a sequence must have terminal operation. In this case, it needs a `.toList()`
- The `.filter{ it < 11 }` should be `.filter{ it > 11 }`
- The `yieldAll(1..20)` should be `yieldAll(1..10)`
Answer: The correct answer of the above question is Option B:To produce result, a sequence must have terminal operation. In this case, it needs a `.toList()`