title: Why does Map addition of duplicates only take the last key's value
body: <p>Per this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/7076128/best-way-to-merge-two-maps-and-sum-the-values-of-same-key">Best way to merge two maps and sum the values of same key?</a></p>
  
  <p>I would need to use scalaz to get what I want, however I am curious if anybody knew why the below does not work as I expect?</p>
  
  <pre><code>Map(1-&gt;2.0)+(1-&gt;1.0)     //Map(1-&gt;1.0)
  </code></pre>
  
  <p>I would expect this to result in  <code>Map(1-&gt;3.0)</code>. But, it appears that maps only return the last key as shown by:</p>
  
  <pre><code>Map(1-&gt;1.0, 1-&gt;3.0)     //Map(1-&gt;3.0)
  </code></pre>
  
  <p>So, based on the <a href="http://www.scala-lang.org/api/current/index.html#scala.collection.immutable.Map" rel="nofollow noreferrer">documentation</a> </p>
  
  <blockquote>
    <p>Adds two or more elements to this collection and returns a new collection.</p>
  </blockquote>
  
  <p>and the above, my guess is that the map might store the values, but only return the last item? This is just not my intuition of what the add should do...maybe it is an efficiency move. </p>
  
  <p>Once I have more of a moment, I will take a look at the code and try to figure it out from there, but wanted to ask here in case somebody already knew?</p>