Created
February 16, 2018 00:50
-
-
Save djspiewak/861e42ce3d72500c48ab3787f18a2e69 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val second = Vector(1, 2, 3) flatMap { x => | |
Set(4, 5, 6) flatMap { y => | |
List(7, 8, 9) | |
} | |
} | |
// => Vector(7, 8, 9, 7, 8, 9, 7, 8, 9) | |
val third = Vector(1, 2, 3) flatMap { x => | |
Set(4, 5, 6) | |
} flatMap { y => | |
List(7, 8, 9) | |
} | |
// => Vector(7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment