Notes on the Exercises
- Exercise 7.24: This exercise requires that you write
the procedure movies-satisfying. The second and third tests
require that you also write the filter predicate
director-is-actor?.
- Exercise 7.26: Self-explanatory.
- Exercise 7.27: This exercise just asks you to run the query
loop. Since it is tedious to repeatedly type the same queries in the
interaction window, the test
file automates the running of the query loop through
the query-test procedure provided by
the movie-test-utilities module.
Testing for exercises 7.28 and 7.25 follows the same approach.
- Exercise 7.28: Note how the test for this exercise defines the
movie pattern/action list by separately defining a
director-action procedure that utilizes
the-only-element-in. The test makes the same queries as for
exercise 7.27, but the responses give just the movie's director, not the
list containing the movie's director as in 7.27.
- Exercise 7.25: The test for this exercise adds to the movie
pattern/action list by using action procedures that you must define, as
in exercise 7.28.