title: How to use mutable collections in Scala
body: <p>I think I may be failing to understand how mutable collections work. I would expect mutable collections to be affected by applying map to them or adding new elements, however:</p>
  
  <pre><code>scala&gt; val s: collection.mutable.Seq[Int] = collection.mutable.Seq(1)
  s: scala.collection.mutable.Seq[Int] = ArrayBuffer(1)
  
  scala&gt; s :+ 2 //appended an element
  res32: scala.collection.mutable.Seq[Int] = ArrayBuffer(1, 2)
  
  scala&gt; s //the original collection is unchanged
  res33: scala.collection.mutable.Seq[Int] = ArrayBuffer(1)
  
  scala&gt; s.map(_.toString) //mapped a function to it
  res34: scala.collection.mutable.Seq[java.lang.String] = ArrayBuffer(1)
  
  scala&gt; s //original is unchanged
  res35: scala.collection.mutable.Seq[Int] = ArrayBuffer(1)
  
  //maybe mapping a function that changes the type of the collection shouldn't work
  //try Int =&gt; Int
  
  scala&gt; s.map(_ + 1)
  res36: scala.collection.mutable.Seq[Int] = ArrayBuffer(2)
  
  scala&gt; s //original unchanged
  res37: scala.collection.mutable.Seq[Int] = ArrayBuffer(1)
  </code></pre>
  
  <p>This behaviour doesn't seem to be separate from the immutable collections, so when do they behave separately?</p>