title: How is this function dealing into 2 lists?
body: <p>The purpose of this self created function is to take in a list, and output 2 lists, they are to ne inserted into the lists alternating. SO [4,5,1,6,7,8] will be dealt into 2 lists like ([4,1,7],[5,6,8])</p>
  <pre><code>deal :: [a] -&gt; ([a],[a])
  deal [] = ([],[])
  deal [x] = ([x],[])
  deal (x:xs) = let (ys,zs) = deal xs
                in (x:zs, ys)
  </code></pre>
  <p>this is the function. Im not understanding what is happening with let (ys,zs) = deal xs, i know its basically creating a placeholder for 2 lists but can someone walk me through the recursion thats taking place.</p>