Quirksand

SICP

SICP 2.1.1 Exercises

December 23, 2013 17:17

Chapter 2 begins with just one exercise. The procedures are already written for you, and the exercise is in making a modification that produces more sensible results.

Included in the file are various test values, but as with any set of tests, feel free to try your own set of numbers. The required changes (adding negative numbers) are checked as well as the previously working positive calculations, to ensure that those were not inadvertantly modified. The results are displayed both before and after the changes made, so it should be possible to spot exactly what changes were made. As always, this requires the ability to redefine procedure names, so make sure that is enabled for the language you are using.

Exercises 2.1.1