title: Scheme programming, going through a list and making everything inside a list
body: <p>homework question:</p>
  
  <p><code>(diginlist '(4 5 3 2 8))</code> is supposed to return <code>(4(5(3)2)8)</code></p>
  
  <pre><code>(define(removelast L)
    (if(null?(cdr L)) '()
       (cons(car L) removelast(cdr L))))
  
  (define(last L) (if(null?(cdr L)) (car L) (last(cdr L))))
  
  (define(diginlist L)
    (cond((null? L) '())
         ((list?(car L)) ((diginlist(car L))
                             (list(diginlist(cdr L)))))
         (else(append(list(diginlist(cdr L)))))))
  
  (diginlist '(4 5 3 2 8))
  </code></pre>
  
  <p>returns:</p>
  
  <p><code>(list (list (list (list (list '())))))</code></p>
  
  <p>I know I am supposed to incorporate removelast and last, but I am having trouble doing so.</p>