title: Variable multi-assign via unzip on List[( (A,B),(C,D) )], or List[(A,B,C,D)]
body: <p>In regard to <a href="https://stackoverflow.com/q/13006973/185840">this question</a> I was able to multi-assign via <code>unzip</code> on a <code>List[(A,B)]</code></p>
  
  <p>However, now I'm finding a need to multi-assign on either a <code>List[( (A,B),(C,D) )]</code> or a <code>List[(A,B,C,D)]</code></p>
  
  <p>I see that there is an unzip for pairs, and an unzip3 for triplets, but how to destructure a pair of <code>Tuple2</code> OR a single <code>Tuple4</code> so as to multi-assign? I'll adapt the collection type below accordingly, but whichever one works for 1-step multi-assignment is fine.</p>
  
  <pre><code>// foo can be a List[(A,B,C,D)] OR List[( (A,B),(C,D) )]
  val(a,b,c,d) = foo.unzip
  </code></pre>
  
  <p>This works but is hacked</p>
  
  <pre><code>val(a,b,c_d) foo.unzip3 // foo is a List[(A,B,(C,D))]
  </code></pre>
  
  <p>because I wind up having to <code>c_d._1</code> and <code>c_d._2</code>, the very notation I'm trying to avoid by multi-assigning variables</p>