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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!