title: Subdividing a list in haskell
body: <p>How can I group a list into smaller lists of equal length (except last sublist) in haskell?</p>
  
  <p>E.g.</p>
  
  <pre><code>sublist 3 [1,2,3,4,5,6,7,8] -&gt; [[1,2,3],[4,5,6],[7,8]]
  sublist 2 [4,1,6,1,7,3,5,3] -&gt; [[4,1],[6,1],[7,3],[5,3]]
  </code></pre>