Question
What does map do on a Scala collection?
Select an option. Your answer will be checked instantly.
Correct Answer: A. Applies a function to each element and returns the transformed collection
Explanation:
The output contains one transformed result for each input element.
The original immutable collection remains unchanged.
Leave a Reply