previous | index | next

Exercise 7.31

After completion of this exercise you will be able to make these queries:
   (what movies were made before 1952)
   ((casablanca) (citizen kane) (gone with the wind) (metropolis))
      [4 movies]

   (what movies were made in 1952)
   ((an american in paris) (othello))
      [2 movies]

   (what movies were made after 1952)
   ((amarcord) (the big easy) (boyz n the hood) (dead again) (the godfather) 
    (lawrence of arabia) (the manchurian candidate) (spartacus) (a star is born) 
    (after the rehearsal) (amadeus) (blood simple) (chinatown) (the cotton club) 
    (the crying game) (the day of the jackal) (diva) (the dresser) (el norte) 
    (the exorcist) (a fish called wanda) (flirting) (gates of heaven) (house of games) 
    (iceman) (jaws) (johnny got his gun) (local hero) (malcolm x))
      [29 movies]

   (what movies were made since 1991)
   ((boyz n the hood) (dead again) (the crying game) (flirting) (malcolm x))
    [5 movies]
This requires the pattern/action pair made by:
	(make-pattern/action  ; new for exercise 7.31
	 '(what (movie movies) (was were) made (in before after since) _)
	 movies-before-after-action)
You will need to write the action procedure movies-before-after-action.

previous | index | next