title: How to fix my Fibonacci stream in Scala
body: <p>I defined a function to return Fibonacci stream as follows: </p>
  
  <pre>def fib:Stream[Int] = {
    Stream.cons(1,
      Stream.cons(2,
        (fib zip fib.tail) map {case (x, y) => println("%s + %s".format(x, y)); x + y}))
  }</pre>
  
  <p>The functions work ok but it looks inefficient (see the output below)</p>
  
  <pre>scala> fib take 5 foreach println
  1
  2
  1 + 2
  3
  1 + 2
  2 + 3
  5
  1 + 2
  1 + 2
  2 + 3
  3 + 5
  8</pre> 
  
  <p>So, it looks like the function calculates the n-th fibonacci number from the very beginning. Is it correct? How would you fix it? </p>