Skip to content

Instantly share code, notes, and snippets.

@piyushmaurya23
Created October 16, 2015 21:02
Show Gist options
  • Save piyushmaurya23/1c4aadaadaccba4b33bd to your computer and use it in GitHub Desktop.
Save piyushmaurya23/1c4aadaadaccba4b33bd to your computer and use it in GitHub Desktop.
8. Define a Recursive LISP function which takes two arguments first, an atom, second, a list, returns a list after removing first occurrence of that atom within the list.
(defun remov(elt lst)
(cond ((null lst) nil)
((equal elt (first lst))(rest lst))
(elt (cons (first lst)(remov elt (rest lst))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment