Let's say that the birth disparity between two authors is the absolute value of the difference between their years of birth, the death disparity is the absolute value of the difference between their years of death, and the chronological disparity is the sum of the birth disparity and the death disparity.
Given the name, year of birth, and year of death of an author A, one
can search a database (like the one presented in exercise #2) for A's closest
contemporary -- the author B, listed in the database, who has
the smallest chronological disparity from B. For instance, using
the list-of-authors database, the closest contemporary of
Francis Bacon (1561-1626) is William Shakespeare (1564-1616), because the
chronological disparity between them is only 13 and no author listed
in the database has a lower chronological disparity from Bacon.
The assignment is to design, write, and test a Scheme procedure named
closest-contemporary that takes the three-element list
containing an author's surname, year of birth, and year of death, searches
the list-of-authors database, and returns the string that
gives the surname of the author's closest contemporary:
> (closest-contemporary '("Bacon" 1561 1626))
"Shakespeare"
Use your closest-contemporary procedure to find the closest
contemporary of each of the following authors -- yes, you guessed it --
This document is available on the World Wide Web as
http://www.math.grin.edu/courses/Scheme/fall-1997/exercise-3.html
created September 5, 1997
last revised September 5, 1997