A

Admin • 828.03K Points
Coach

Q. What is the difference between `map()` and `flatMap()`?

  • (A) map flattens, flatMap transforms
  • (B) map transforms, flatMap flattens nested streams
  • (C) Both do the same
  • (D) flatMap does not exist

Explanation by: Admin
`map()` transforms elements; `flatMap()` flattens nested structures into a single stream.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.