Created
July 14, 2019 04:27
-
-
Save justinhj/82f1fe89f0e2332ce8a697d2b2126ba2 to your computer and use it in GitHub Desktop.
This file contains 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 fb = Stream.emits(List("", "", "fizz")).repeat.zip(Stream.emits(List("", "", "", "", "buzz")).repeat).map{case (a,b) => a |+| b} | |
fb: Stream[Nothing, String] = Stream(..) | |
@ fb.take(30).toList | |
res37: List[String] = List( | |
"", | |
"", | |
"fizz", | |
"", | |
"buzz", | |
"fizz", | |
"", | |
"", | |
"fizz", | |
"buzz", | |
"", | |
"fizz", | |
"", | |
"", | |
"fizzbuzz", | |
"", | |
"", | |
"fizz", | |
"", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment