title: Stream of readLines
body: <p>I'm attempting to create an infinite stream of strings from readLine calls:</p>
  
  <pre><code>import java.io.{BufferedReader, InputStreamReader}
  val in = new BufferedReader(new InputStreamReader(System in))
  val input: Stream[String] = Stream.cons(in readLine, input)
  </code></pre>
  
  <p>But it appears that the readLine call isn't being called lazily. Immediately after entering that code, the readLine expects input then the Stream becomes an infinite list of that same input. Is it possible to accomplish what I have in mind?</p>