collect and collectFirst methods will be see in course C#03
def map[B](f: (A) ⇒ B): Traversable[B]
Map is a HOF that builds a new collection by applying a function to all elements of this collection.
> List("John Snow", "Aria Stark", "Tyrion Lannister").flatMap(x => x.split(" "))
res0: List[String] = List(John, Snow, Aria, Stark, Tyrion, Lannister)
The #1 tech hiring platform