Question
What is the purpose of a for-comprehension?
Select an option. Your answer will be checked instantly.
Correct Answer: C. Expressing iteration, filtering, and mapping over collections
Explanation:
For-comprehensions translate into methods such as map, flatMap, and withFilter.
They can produce values using yield.
Leave a Reply