Question
What does flatMap do?
Select an option. Your answer will be checked instantly.
Correct Answer: C. Maps each element to a collection and flattens the results
Explanation:
flatMap is useful when one input can produce zero or many outputs.
Tokenizing lines into words is a common example.
Leave a Reply