Skip to content

Instantly share code, notes, and snippets.

@nickleeh
Created May 17, 2015 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickleeh/1fe4f6154d911f0c37b0 to your computer and use it in GitHub Desktop.
Save nickleeh/1fe4f6154d911f0c37b0 to your computer and use it in GitHub Desktop.
val fibs: Stream[Int] = 0 #:: fibs.scanLeft(1)(_ + _)
fibs.take(20).toList
fibs take 20 toList
val fibs: Stream[BigInt] = 0 #:: fibs.scanLeft(1)(_ + _)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment