CS2322

Laboratory Problem 19

An Abstraction for Deep Recursion

In this problem we wish to use the procedure abstraction for deep recursion, given by Springer and Friedman in Section 7.5 of the text, to define functions remove-all-c and product-all.

remove-all-c is a curried function having the form:

(define remove-all-c

(lambda (item)

(lambda (list)

...)))

that is, remove-all-c takes an argument item and returns a procedure having an argument list which will remove all occurances of item from list.

The function product-all has the form:

(define product-all

(lambda (list)

...))

and computes the product of all the numbers in list.

You should formulate your definitions of these functions in terms of the procedure abstraction deep-recursion.

Lab 19 Scheme Code
Lab 19-1 Scheme Code
Lab 19-2 Scheme Code
Lab 19-3 Scheme Code