title: Elegant way to invert a map in Scala
body: <p>Learning Scala currently and needed to invert a Map to do some inverted value->key lookups.  I was looking for a simple way to do this, but came up with only:</p>
  
  <pre><code>(Map() ++ origMap.map(kvp=&gt;(kvp._2-&gt;kvp._1)))
  </code></pre>
  
  <p>Anybody have a more elegant approach?</p>