title: Fastest way to append sequence objects in loop
body: <p>I have a for loop within which I get an <code>Seq[Seq[(String,Int)]]</code> for every run.  I have the usual way of running through the <code>Seq[Seq[(String,Int)]]</code> to get every <code>Seq[(String,Int)]</code> and then append it to a <code>ListBuffer[Seq[String,Int]]</code>.</p>
  
  <p>Here is the following code:</p>
  
  <pre><code>var lis; //Seq[Seq[Tuple2(String,Int)]]
  var matches = new ListBuffer[(String,Int)]
  
  someLoop.foreach(k=&gt;
    // someLoop gives lis object on evry run,
    // and that needs to be added to matches list
    lis.foreach(j =&gt; matches.appendAll(j))  
  )
  </code></pre>
  
  <p>Is there better way to do this process without running through <code>Seq[Seq[String,Int]]</code> loop, say directly adding all the seq objects from the <code>Seq</code> to the <code>ListBuffer</code>?</p>
  
  <p>I tried the <code>++</code> operator, by adding <code>matches</code> and <code>lis</code> directly. It didn't work either. I use Scala 2.10.2</p>