title: How is the Stream-cons #:: translated in Scala?
body: <p>I'm currently learning Scala by working through the "Programming in Scala" book. So far, there have been nice explanations for everything that looks weird (from a Java programmer's perspective), but this one example using a Stream to generate the Fibonacci sequence leaves me kind of puzzled:</p>
  
  <pre><code>def fibFrom(a: Int, b: Int): Stream[Int] =
    a #:: fibFrom(b, a + b)
  </code></pre>
  
  <p>How is the construction of the Stream done? Of course the <code>#::</code> operator is somehow responsible for that. I understand that since it ends in <code>:</code>, it is right-associative, but that does not explain the creation of the Stream. I guess it is implicitly translated to a constructor somehow but I don't see why and how exactly.</p>
  
  <p>I've already looked for answers in <code>Predef.scala</code> and <code>LowPriorityImplicits.scala</code> but no luck so far.</p>
  
  <p>Can anyone enlighten me?</p>