Homework Assignment 2

MCS-178: Introduction to Computer Science II
Max Hailperin, Fall 2001; Due: October 5th

Remember: You are encouraged to turn in individual problems as soon as possible, rather than turning in the whole assignment on the due date. Please mark each problem with the exercise number from the book.

Exercises 11.21-11.23 below call for procedures that modify a given vector. Each of these procedures takes a vector as an argument (as well as, in some cases, other arguments). The procedure should modify this vector, not create a new one. It doesn't matter what value the procedure returns.

To make DrScheme display vectors in the standard Scheme way, you can evaluate the following expression in DrScheme: (print-vector-length #f) This will, for example, make a vector of length four containing four zeros print out as #(0 0 0 0) instead of #4(0).