Question: Implement the following functions in Scheme using fold-left and map. DO NOT use recursive definition for this problem. (this problem need to use scheme) 1.Define

Implement the following functions in Scheme using fold-left and map. DO NOT use recursive definition for this problem. (this problem need to use scheme)

1.Define a function addOne, which takes a list of numbers and returns a list where each number in the input list is increased by one. For example, (addOne (1 2 3 4)) should return (2 3 4 5), and (addOne (2 4 6 8)) should return (3 5 7 9). 2. Define a function lstOR, which takes a list of Booleans and returns #f if and only if all of the Booleans are false. For example, (lstOR (#t #f)) should return #t, and (lstOR (#f #f)) should return #f. For your convenience, (lstOR ()) is defined as #f (functions and, or implement logical , in Scheme). 3. Define a function removeDup, which takes a list of ordered numbers, and returns a list that is identical to the input except that duplicated numbers are removed. For example, (removeDup (1 1 2)) should return (1 2); (removeDup (3 5 5 7 7 7 9)) should return (3 5 7 9).

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 Databases Questions!