Question: b. (10 points) Implement a predicate function mymember in Scheme that takes an atom and a simple list; returns #t if the atom is in
b. (10 points) Implement a predicate function mymember in Scheme that takes an atom and a simple list; returns #t if the atom is in the list; #f otherwise. You are not allowed to use the built-in member function (6p). Provide two test cases for this function (2p each). CPS 352 - Assignment 2 by Your Name > (mymember 'a '(b)) #f > (mymember 'a '(a b)) c. Examples:(10 points) Implement la predicate function (mylist-of-numbers? lst) in Scheme that takes a list 1st as the only one argument and returns #t if all elements of lst are number; returns #f otherwise (6p). Provide two test cases for this function (2p each). Examples: CPS 352 - Assignment 2 by Your Name > (list-of-numbers? (1 2 4)) > (list-of-numbers? (1 2 4 b c)) f b. (10 points) Implement a predicate function mymember in Scheme that takes an atom and a simple list; returns #t if the atom is in the list; #f otherwise. You are not allowed to use the built-in member function (6p). Provide two test cases for this function (2p each). CPS 352 - Assignment 2 by Your Name > (mymember 'a '(b)) #f > (mymember 'a '(a b)) c. Examples:(10 points) Implement la predicate function (mylist-of-numbers? lst) in Scheme that takes a list 1st as the only one argument and returns #t if all elements of lst are number; returns #f otherwise (6p). Provide two test cases for this function (2p each). Examples: CPS 352 - Assignment 2 by Your Name > (list-of-numbers? (1 2 4)) > (list-of-numbers? (1 2 4 b c)) f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
