Last active
May 27, 2016 21:53
-
-
Save sguzman/0b855ec4fab9ed8881bd040616645a22 to your computer and use it in GitHub Desktop.
Fibonacci Stream
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 fib: Stream[BigInt] = BigInt(0) #:: BigInt(1) #:: fib.zip(fib.tail).map (n => n._1 + n._2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment