title: Groovy list.sort by first, second then third elements
body: <p>I have a groovy list of lists i.e.</p>
  
  <pre><code>list = [[2, 0, 1], [1, 5, 2], [1, 0, 3]]
  </code></pre>
  
  <p>I would like sort it by order of the first element, then second, then third.</p>
  
  <p>Expected</p>
  
  <pre><code>assert list == [[1, 0, 3], [1, 5, 2], [2, 0, 1]]
  </code></pre>
  
  <p>I started with <code>list = list.sort{ a,b -&gt; a[0] &lt;=&gt; b[0] }</code> but that only sorts the first element. How do you finish?</p>
  
  <p>Thanks</p>