Question: Problem Statement LISP/SCHEME Exercise For this programming exercise you will create a single (text) file containing the functions that implement each of the following problems.

Problem Statement LISP/SCHEME Exercise For this programming exercise you will create a single (text) file containing the functions that implement each of the following problems. Each is worth 5 points. You may either download and install the scheme compatible environment from racket-lang.org (DrRacket IDE) or use www.wescheme.org/openEditor to develop and test your code. Please indicate in a comment at the TOP of your file which environment you used. I will copy and paste your code in from your text file to test. In each of the following problems, there may be a built-in operation in scheme such as Reverse or Sum. DO NOT USE those built in solutions. Write your own. You must also use recursion for repetition. No iteration statements even if the version of scheme includes them. Part 1: Write a scheme function that sums the values in a list of numbers. You do not have to perform error checking. Assume all of the values in the list are numeric. If the parameter passed in is not a list, return 0 as the sum. >(sum (10 20 30 40)) > 100 > (sum) > (sum 'a) Part 2: Write a scheme function that produces a list that contains the same elements as the original input list but in reverse order. You may assume a valid list is passed in (not a single atom). > (reverse (10 20 30 40)) >(40 30 20 10) >(reverse) > O Part 3: Write a scheme function that returns true if two lists are disjoint. (also return true if either list is just an atom and not a list). If either list is empty, then they are also disjoint sets. Part 4: Write a scheme function that removes all occurrences of an atom value from a list. > (remove 'a '(b ca d a 40)) > (b c d 40)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
