expt
function).
>(my-remove 'hello '(hello why dont you say hello)) (WHY DONT YOU SAY) >(my-remove '(oops my) '(1 2 (oops my) 4 5)) (1 2 4 5)
Write a recursive function called MY-MEMBER which checks for an atom inside nested lists. Here are examples:>(member 3 '(1 2 3 4 5) ) (3 4 5) >(member 'hey '(whats going on here) ) NIL >(member 'key '(where did (i (put) the (key))) ) NIL
>(my-member 3 '(1 2 3 4 5) ) T >(my-member 'hey '(whats going on here) ) NIL >(my-member 'key '(where did (i (put) the (key))) ) T
So, for example:(defun palindromep (lst) (equal lst (reverse lst)) )
Write a recursive version of this function called R-PALINDROMEP without using the function reverse.>(palindromep '(1 2 3 4 5 4 3 2 1)) T >(palindromep '(a b b a)) T >(palindromep '(1 2 3)) NIL
This would be more readable (to most humans) in ``infix'' notation:(+ (* 1 2 pi) 3 (- 4 5))
Write a function INFIX which given LISP-like mathematical expressions, returns the infixed version.((1 * 2 * pi) + 3 + (4 - 5))
© Colin Allen & Maneesh Dhagat