Question
;; LISP Assignment #1 (100 pts) ;; ;; 1. (25 puts) write a recursive function named MYMEMBER that takes an ATOM (atm) and a LIST
;;LISP Assignment #1 (100 pts) ;; ;; 1. (25 puts) write a recursive function named MYMEMBER that takes an ATOM (atm) and a LIST (lst) ;; and returns the ATOM if it is a MEMBER, otherwise NIL ;; ex. (MYMEMBER D (A B C D E F G) returns => D ;; ex. (MYMEMBER H (A B C D E F G) returns => NIL ;; ;; 2. (25 pts). write a recursive function named MYFACT that takes an INTEGER and returns that many ;; factorial values on a list ;; ex. (MYFACT 4) returns => (24 6 2 1) ;; ;; 3. (25 pts). write a recursive list reversal - given ;; ex. (MYREVERSE (a b c)) returns => (c b a) ;; ;; 4. (25 puts). write a recursive double-odd, MY-DOUBLE-ODD that doubles the odd values and leaves ;; the even values alone ;; ex. (MY-DOUBLE-ODD (1 2 3 4 5 6)) returns => (2 2 6 4 10 6) ;;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started