title: Best way to represent a readline loop in Scala?
body: <p>Coming from a C/C++ background, I'm not very familiar with the functional style of programming so all my code tends to be very imperative, as in most cases I just can't see a better way of doing it.</p>
  
  <p>I'm just wondering if there is a way of making this block of <strong>Scala</strong> code more "<em>functional</em>"?</p>
  
  <pre><code>var line:String = "";
  var lines:String = "";
  
  do {
      line = reader.readLine();
      lines += line;
  } while (line != null)
  </code></pre>