Skip to content

Instantly share code, notes, and snippets.

@animatedlew
Created March 14, 2017 17:20
Show Gist options
  • Save animatedlew/3230d8c760a93e054c72c3a2f69bdd50 to your computer and use it in GitHub Desktop.
Save animatedlew/3230d8c760a93e054c72c3a2f69bdd50 to your computer and use it in GitHub Desktop.
object Main extends App {
val lst1 = List(1, 2, 3, 4).toStream
val lst2 = List('A', 'B', 'C', 'D', 'E', 'F').toStream
lst1 zip lst2 foreach { case (a, b) => println(s"pair: ($a, $b)") }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment