title: Scala: How to merge lists by the first element of the tuple
body: <p>Let say I have a list: </p>
  
  <pre><code>[(A, a), (A, b), (A, c), (B, a), (B, d)]  
  </code></pre>
  
  <p>How do I make that list into: </p>
  
  <pre><code>[(A, [a,b,c]), (B, [a,d])]  
  </code></pre>
  
  <p>with a single function?</p>
  
  <p>Thanks</p>