![]() Res1: ] = Vector(Some(one), Some(two), Some(three)) Res0: = Vector(one, two, three)īy contrast, notice what the map method gives you: Although there are other ways to get the values from a Scala map, you can use flatMap for this purpose: Here's an interesting use of flatMap I just thought about. Convert Map values to a sequence with flatMap
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |