Skip to content

Instantly share code, notes, and snippets.

@wchristian
Forked from churib/gist:5908179
Last active December 19, 2015 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wchristian/5908229 to your computer and use it in GitHub Desktop.
Save wchristian/5908229 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