Created
October 16, 2015 21:02
-
-
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.
This file contains 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 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