Write Function Rember2 Takes Two Arguments Atom List Atoms 1 Removes Second Occurrence L E Q37238676

write the function rember2 which takes two arguments: an atom aand a list of atoms 1 and removes the second occurrence of a inl

Examples: (rember2 ‘fudge ‘(ice cream with fruit for dessert))returns (ice cream with fruit for dessert). in “Emacs”


Answer


SOLUTION:-

SOLUTION: (defun rember (a I) cond (null I) ) ( (eq a (car I)) (cdr I)) t (cons (car I) (rember a (cdr I)))) (defun rember2 (==========================================================================================

SOLUTION: (defun rember (a I) cond (null I) ) ( (eq a (car I)) (cdr I)) t (cons (car I) (rember a (cdr I)))) (defun rember2 (a l) cond

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.