Skip to content

Instantly share code, notes, and snippets.

Avatar

Pedro Matiello pmatiello

View GitHub Profile
View Streams.scala
object Streams {
def main(args: Array[String]) {
val list = fibonacci()
(list take 20) foreach println
}
private def eagerNaturals() = {
def naturals(n: Int): List[Int] = n :: naturals(n + 1)
naturals(0)