title: How to split a list into equal sized lists in Groovy?
body: <p>If I have this:</p>
  
  <pre><code>def array = [1,2,3,4,5,6]
  </code></pre>
  
  <p>Is there some built-in which allows me to do this ( or something similar ):</p>
  
  <pre><code>array.split(2)
  </code></pre>
  
  <p>and get:</p>
  
  <pre><code>[[1,2],[3,4],[5,6]]
  </code></pre>
  
  <p>?</p>