Last active
October 15, 2016 13:09
-
-
Save hmenn/eb19083ed9827192f028dddbda37dec0 to your computer and use it in GitHub Desktop.
remove all occurance of element from list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun my-all-occ-remove (item l) | |
| (cond | |
| ((endp l) nil) | |
| ((equal item (first l)) (my-all-occ-remove item (rest l))) ; remove item | |
| (t (cons (first l) (my-all-occ-remove item (rest l)))) | |
| )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment