Skip to content

Instantly share code, notes, and snippets.

@hmenn
Last active October 15, 2016 13:09
Show Gist options
  • Select an option

  • Save hmenn/eb19083ed9827192f028dddbda37dec0 to your computer and use it in GitHub Desktop.

Select an option

Save hmenn/eb19083ed9827192f028dddbda37dec0 to your computer and use it in GitHub Desktop.
remove all occurance of element from list
(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