Skip to content

Instantly share code, notes, and snippets.

@lopex
Created December 23, 2010 17:06
Show Gist options
  • Save lopex/753250 to your computer and use it in GitHub Desktop.
Save lopex/753250 to your computer and use it in GitHub Desktop.
object fibx {
def main(args: Array[String]) {
def fs: Stream[Int] = {
println("fs")
0 #:: 1 #:: fs.zip(fs.tail).map{case (a,b) => println("a: " + a + " b: " + b);a + b}
}
var f = fs
1 to 10 foreach { e =>
f = f drop 1
println("Wynik " + f.head)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment