Due: 10:00 a.m., Wednesday, 27 February 2008
Summary: In this assignment, you will report on your work in the lab on list iteration.
Purposes:
To encourage you to reflect a bit more closely on the
map and foreach!
procedures. To give you more experience writing documentation.
Expected Time: Two to three hours.
Collaboration: You must work in a group of size two or size three. (If you need help identifying a group, please let me know.) You may discuss this assignment and possible solutions with anyone you wish. If you discuss this assignment with people other than group members, make sure to include a citation (e.g., “I consulted this person, who helped me do this”).
Submitting:
Email your answer to <davisjan@cs.grinnell.edu>. The title of your email
should have the form HW5 and
should contain your answers to all parts of the assignment. Scheme code
should be in the body of the message.
Warning: So that this assignment is a learning experience for everyone, we may spend class time publicly critiquing your work.
1. Provide code and documentation for the “safer” version of
image-render-spot! that you wrote in
Exercise 3.e of the
lab on list iteration.
2. Provide code and documentation for spots-htrans,
spots-vtrans, and spots-translate,
which you wrote in
Exercise 4 of the
lab on list iteration.
3. For each of the following expressions from Exercise 5 of the lab on list iteration, explain what effect the expression had, and your understanding of why it had that effect.
(image-render-spots! canvas aardvark)(foreach! (lambda (spots) (image-render-spots! canvas spots)) aardvark)(foreach! (lambda (factor) (image-scaled-render-spots! canvas figure factor))
(list 1 2 3 4 5))4. Complete either Extra 1 or Extra 3 from the lab on list iteration.
We intend to evaluate your assignment on the correctness and elegance of your solutions.