title: Lisp Arithmetic simplification
body: <p>I'm a newbie when it comes to programming in lisp and ill be honest recursion is not my forte, I was tasked with writing a function that would simplify arithmetic equations but not solve them. Here is the guidelines this is a school project by the way.  </p>
  
  <p>*Write function simplify that takes any arithmetic expression as described above (not just the examples shown) and returns a new function in which the following improvements are made, if they are possible:</p>
  
  <ol>
  <li><p>Multiplication sub-expression 
  a. With a 0 as an argument, sub-expression is replaced by 0:  <code>(* 3 5 0) -&gt; 0</code>
  b. With a 1 as an argument, the 1 is removed: <code>(* 1 2 6) -&gt; (* 2 6)</code>.   If only one argument remains then the sub-expression is replaced by that argument:   <code>(* 1 6) -&gt; 6</code></p></li>
  <li><p>Addition sub-expression
  a. Any occurrence of 0 is eliminated:  <code>(+ 0 2 7 7) -&gt; (+ 2 7 7)</code>.  If only one argument remains, the sub-expression is eliminated:  <code>(+ 0 7) -&gt; 7</code></p></li>
  </ol>
  
  <p>My group mates and I have written this so far :</p>
  
  <pre><code>(defun simplify (lis)
    (cond
     ((null lis) '())
     ((eq (car lis) '*)
      (cond
       ((not(null (member '0 lis))) 0)
       ((not(null (member '1 lis))) (simplify (remove '1 lis)))
       (t (simplify (cdr lis)))
       )
      )
  
     ((eq (car lis) '+)
      (cond
       (t 0)
       )
      )
     ((listp (car lis)) (cons (simplify (car lis))(simplify (cdr lis))))
     (t (cons (simplify (car lis)) (simplify (cdr lis))))
  
     )
    )
  </code></pre>
  
  <p>We cant get it to work Correctly if you have any suggestions! Thank you also you can ignore our + function that isn't finished.</p>