Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting

Authors: Carl S. Warren, James M. Reeve, Philip E. Fess

20th Edition

0324025424, 978-0324025422

More Books

Students also viewed these Accounting questions

Question

What do you know of my (the interviewers) research program?

Answered: 1 week ago

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago

Question

2. What role should job descriptions play in training at Apex?

Answered: 1 week ago