Next: Abstract Data Types
Up: No Title
Previous: No Title
- (a)
- [4 points] Write a function (copies n wd) that takes two arguments:
a number and word and returns a sentence which contains n copies of the word wd.
For example (copies 3 'yeah)
(yeah yeah yeah).
- (b)
- [4 points] Write a function zip that takes two lists and zips
them, i.e. contsructs one list with elements from the two lists alternating.
If one of the lists runs out of elements before the other, just append
the remaining elements. Example: (zip '(1 2 3 4) '(5 6 7 8 9 10 11))
(1 5 2 6 3 7 4 8 9 10 11).
Behfar Bastani-Booshehri
Wed Dec 9 10:04:14 CST 1998