Skip to content

Instantly share code, notes, and snippets.

@sguzman
Last active May 27, 2016 21:53
Show Gist options
  • Save sguzman/0b855ec4fab9ed8881bd040616645a22 to your computer and use it in GitHub Desktop.
Save sguzman/0b855ec4fab9ed8881bd040616645a22 to your computer and use it in GitHub Desktop.
Fibonacci Stream
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