Skip to content

Instantly share code, notes, and snippets.

@churib
Created July 2, 2013 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save churib/5908179 to your computer and use it in GitHub Desktop.
Save churib/5908179 to your computer and use it in GitHub Desktop.
(defun remove* (symbol tree)
"Removes SYMB0L from TREE."
(cond ((null tree) tree)
((atom (car tree))
(if (equalp symbol (car tree))
(remove* symbol (cdr tree))
(cons (car tree) (remove* symbol (cdr tree)))))
(t (cons (remove* symbol (car tree))
(remove* symbol (cdr tree))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment