title: Nice way to add number to element in Scala map if key exists or insert new element it not
body: <p>I know about couple of similar questions. They don't help me - code does not work if there is no existing key.</p>
  
  <p>I need just some nice approach to append Map with value adding it to existing key (if it does exist) or putting as NEW key (if map does not contain appropriate key).</p>
  
  <p>Following code works but I don't like it:</p>
  
  <pre><code>val a = collection.mutable.Map(("k1" -&gt; 1), ("k2" -&gt; 5))
  val key = "k1"
  
  val elem = a.get(key)
  if (elem == None) {
      a += ("k5" -&gt; 200)
  } else {
      a.update(key, elem.get + 5)
  }
  </code></pre>
  
  <p>Any point to better one?
  Current Scala version is 2.10.4 and I cannot currently switch to 2.11.
  Mutable map is not 100% limitation but preferred.</p>
  
  <p>Here is, for example, <a href="https://stackoverflow.com/questions/9003874/idiomatic-way-to-update-value-in-a-map-based-on-previous-value">similar question</a> but I also need to account case of non-existing key which is not accounted there. At least we should understand <code>a.get(key)</code> could be <code>None</code> or add some better approach. Good idea was <code>|+|</code> but I'd like to keep basic Scala 2.10.x.</p>