next up previous
Next: About this document Up: No Title Previous: Sorting lists

Vectors

Remember that for dealing with vectors you have the following constructors and selectors:

(a)
[5 points] Write a function max-vector that computes the maximum value in a vector, e.g. (max-vector #(2 -5 7 4)) tex2html_wrap_inline266 7 (remember you are dealing with vectors here, not with lists, i.e. things like map etc. won't work).
(b)
[5 points] Write a function vector->list that converts a vector into a list containing the same elements, e.g. (vector->list #(2 5 4 3)) tex2html_wrap_inline266 (2 5 4 3).



Behfar Bastani-Booshehri
Wed Dec 9 10:04:14 CST 1998