CISC-280 Program Development Techniques

Homework 3: Data Abstraction, Lists, and Trees

Due: Thursday, October 2, 2008

Fun With Lists

1. (10 points) Exercise 2.18, page 103, reversing a list.. Extra credit (5 points): solve this both as an iterative process and as a recursive process.

2. (12 points) Write a function called palindrome? that is given a list and returns #t if the list has the same sequence of elements when read left to right as when read right to left. It should return #f otherwise.

3. (15 points) Exercise 2.27, page 110, deep reverse. Extra credit (10 points): in addition to the standard implementation, do an implementation that uses map (and the reverse procedure from above).

4. (12 points) Exercise 2.28, page 111, fringe.