title: Scala - Join List of tuples by Key
body: <p>I am looking for a way to join two list of tuples in scala to get same result than Apache spark gives me using join function.
  Example:
  Having two list of tuples such us:</p>
  
  <pre><code>val l1 = List((1,1),(1,2),(2,1),(2,2))
  l1: List[(Int, Int)] = List((1,1), (1,2), (2,1), (2,2))
  
  val l2 = List((1,(1,2)), (2,(2,3)))
  l2: List[(Int, (Int, Int))] = List((1,(1,2)), (2,(2,3)))
  </code></pre>
  
  <p>What is the best way to join by key both list to get the following result?</p>
  
  <pre><code>l3: List[(Int,(Int,(Int,Int)))] = ((1,(1,(1,2))),(1,(2,(1,2))),(2,(1,(2,3))),(2,(2,(2,3))))
  </code></pre>