Workshop on Scheme

Exercises: Wednesday, July 19

Reading: Scheme and the art of programming, chapters 7 through 9 and sections 10.1 through 10.3; Revised(4) report on the algorithmic language Scheme, sections 6.8 and 6.9.


From Scheme and the art of programming: exercises 7.3, 7.5, 7.8, 7.12, 7.23, 7.25, 8.1, 8.8, 8.10, 8.14, 9.1, 9.5, 9.8, 9.13, 10.6.


Rewrite the authors' definition of vector-generator (Program 9.21, page 283) using a do-expression as the body of the let-expression.


For the bubblesort fan: Define a Scheme procedure to sort a given vector using bubblesort or shakersort.

Others: Define a Scheme procedure to sort a given vector using the heapsort algorithm.


Using the random-number generator in the workshop's collection of familiar algorithms, write a procedure that takes any non-negative integer as its argument and returns a vector of that length in which each entry is an independently selected random real number in the interval [0 .. 1).


This document is available on the World Wide Web as

http://www.math.grin.edu/~stone/events/scheme-workshop/Wednesday-exercises.html


created July 18, 1995
last revised July 18, 1995

John David Stone (stone@math.grin.edu)