Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@ 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
You can’t perform that action at this time.