title: Create a HashMap in Scala from a list of objects without looping
body: <p>I have a List of objects, each object with two fields of interest which I'll call "key" and "value".  From that I need to build a HashMap made up of entries where "key" maps to "value".</p>
  
  <p>I know it can be done by looping through the list and calling <code>hmap.put(obj.key, obj.value)</code> for every item in the list.  But somehow it "smells" like this can be done in one simple line of code using <code>map</code> or <code>flatMap</code> or some other mix of Scala's List operations, with a functional construct in there.  Did I "smell" right, and how would it be done?</p>