Assignment VII: Scheme.

1. Write a function Weave, that takes three lists of the same lenght, and builds a list of triples with the corresponding entries in each list. For example, if the inputs are (English, day, book), (Francais, jour, livre), and (Espanol, dia, libro), the function returns the list:

((English, Francais, Espanol), (day, jour, dia), (book, livre, libro)).

2. We can use sets to represent lists. A set is an unordered collection with no duplicates. Define the following functions:

a)

b)

c)

d)

e)

(() (a) (b) (c) (a b) (b c) (a c) (a b c))

The critical step here is to understand how the power-set is built recursively out of the power-set of a set with one fewer element. A useful additional function here is one that takes a function, a value, and a list of lists, and returns the result of applying the function to that value and each element of the list (something like map, but where the function takes two arguments).

f) The elements of a set are arbitrary, and can themselves be sets. Therefore, membership should be defined in terms of set equality, and viceversa. Write the proper definitions for