Last active
June 6, 2018 07:15
-
-
Save morteza/5ef9a1aa45e4ce51e323ea65aefbc428 to your computer and use it in GitHub Desktop.
Fibonacci Sequence in Scala with Immutable Stream
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
val fibs = 0 #:: fibs.scan(1)(_ + _) | |
fibs take 5 toList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment