title: Common Lisp, remove element from list destructive
body: <p>I have a list with cons-pairs, <em>e.g.</em> <code>'((a . 3) (b . 2))</code>. I want to remove a cons-pair destructive if the first element in the cons-pair matches var. My function cannot remove the cons-pair if there is only one cons-pair in the list or if it is first in the list.</p>
  
  <pre><code>(defun delete-bindings! (var symbol-table)
  (cond
   ((endp symbol-table) '())
   ((eql var (caar symbol-table))
    (delete-bindings! var (cdr symbol-table)))
   (t (setf (cdr symbol-table) (delete-bindings! var (cdr symbol-table)))
     symbol-table))))
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>Thanks!</p>