6.7

Assignment 16

home work!

Programming Language ISL+

Due Date Mon 3/20 at 11:59pm

Possible Points 44

Purpose To design functions that process multiple pieces of complex data.

Graded Exercises

Exercise 1 Recall the data definition for an Sexpr and a Path from assignment 14. Design the function traverse that traverses the sexpr with the path and returns the resulting sexpr. If the path is not valid, return #false.

Exercise 2 Recall the data definition for an FT from HW15. Design the function oldest that returns the oldest person in the family tree if they exist, otherwise #false.

Exercise 3 Design the function contains-same-symbols? that determines if two Sexprs contain the same symbols. For example, 'a and '(a) contain the same symbols as do '((a (b b) c)) and '(c b a). 'a and '(a b) do not. Hint: Recall from math classes that two sets are equal if they are both subsets of each other.