Created
August 17, 2015 18:37
-
-
Save nuclearace/6dcd65c04cc1679396d2 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
object Main extends App { | |
val fibs: Stream[BigInt] = BigInt(0) #:: BigInt(1) #:: fibs.zip(fibs.tail).map { n => n._1 + n._2 } | |
fibs take 20 foreach println | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment