title: Split a list into two - one with every second element, and another with all the rest
body: <p>I am writing a recursive function <code>(split L)</code>
  that takes list <code>L</code>, and returns a new list
  containing two sub lists with the first sub list containing every second element in <code>L</code>
  and the second list containing the remaining elements not in the first sub list.</p>
  
  <p>Here
  are examples of how
  split
  should work:</p>
  
  <pre><code>(split ‘(1 2 3 4 5 6 7 8) )  ( (1 3 5 7) (2 4 6 8))
  (split ‘(cat bird dog horse mouse pig tiger gerbil cow) )
  ( (cat dog mouse tiger cow) (bird horse pig gerbil)) 
  </code></pre>
  
  <p>Now here is my attempt:</p>
  
  <pre><code>(define split
      (lambda (L)
          (if
              (null? L)
              '()
              (list (first L) (second L))
          )
      )
  )
  
  (define first
      (lambda (L)
          (if
              (null? L)
              '()
              (cond
                  (
                      (null? (cdr L)) 
                      (car L)
                  )
                  (
                      #t 
                      (cons
                          (car L)
                          (first (cdr (cdr L)))
                      )
                  )
              )
          )
      )
  )
  
  (define second
      (lambda (L)
          (if
              (null? L)
              '()
          )
          (cond
              (
                  (null? (cdr L))
                  '()
              )
              (cons
                  (car (cdr L))
                  (second (cdr (cdr L)))
              )
          )
      )
  )
  </code></pre>
  
  <p>But instead of the expected result I get:</p>
  
  <p>For <code>(split '(1234))</code> I get <code>((1234)())</code>. <br />
  For <code>(first '(1234))</code> I get <code>(1234)</code>. <br />
  For <code>(second '(1234))</code> I get <code>()</code>. <br /></p>