title: In Scala, is there a way to take convert two lists into a Map?
body: <p>I have a two lists, a <code>List[A]</code> and a <code>List[B]</code>. What I want is a <code>Map[A,B]</code> but I want the semantics of <code>zip</code>. So started out like so:</p>
  
  <pre><code>var tuplesOfAB = listOfA zip listOfB
  </code></pre>
  
  <p>Now I'm not sure how to construct a <code>Map</code> from my <code>tuplesOfAB</code>. </p>
  
  <p>As a follow-up question, I also want to invert my map so that from a <code>Map[A,B]</code> I can create a <code>Map[B,A]</code>. Can anyone hit me with a clue-stick?</p>