All problems will require all (applicable) steps from the design recipe, including a template. Before you tackle the homework, remind yourself of our General Advice, Advice on Homeworks (in particular: staple and provide questions), and the Grading Guidelines.
A short homework assignment for this week due to the exam.
Remember: Contract, purpose, header and test cases are always required!
Using the following data definition of FamTree
A FamTree is
-- (make-unknown symbol)
-- (make-child symbol number famTree famTree), where the symbol represents a name, the first FamTree is the mother's family tree, the second FamTree is the father's side, and the number is the birthyear.
And the following data definition for a Name+Generation tuple:
A NamGen is a (make-NamGen sym num) where name is the name of a person and gen is the generation number as measured from the root of some specified FamTree. That is, the child at the root of the FamTree is gen=0, their parents are gen=1, grandparents gen=2, etc.
(define-struct NamGen (name gen))write a function earliest: FamTree --> NamGen, which returns the name and generation of the earliest (farthest back generation) known person in the family tree.
Pondering for the day: What's the difference between a GenList and expressions in Scheme?
90 points total.