Exercise 7.x2: Suppose that the
reverse on pages 181-182, were instead
separately. Now consider the following procedure definition:
(define mystery (lambda (list1 list2) (reverse-onto (reverse list1) list2)))
Describe clearly what the
mystery procedure does, and how
know that it does that.
Write a procedure that has the same effect as the
procedure, but which generates a linearly recursive
process and calls only on itself and the built-in procedures
Do exercise 7.21 on page 187.
Do exercise 7.49 on page 208. Your procedure should work even when given an empty list. To understand what the correct answer is for an empty list, consider this: all elements of a list are postive if there are none that are not positive. In addition to providing your procedure definition, you should explain whether it generates an interative or recursive process.