Vectors are efficient data structures, containing a fixed number of elements that can be accessed in constant time, and in any order. Vectors are mutable, though 'growing' a vector can be costly (as opposed to lists, which can grow at very little cost).
Vectors are printed in Scheme as a hash mark (#) followed by individual elements contained with a set of parenthesis.
(definetest (vector1#\a"dog"0.123 (/23)))
Like lists, vectors can contain any mixture of types. This ability allows vectors to be used to emulate object-oriented class-like mechanisms by storing functions as elements of the vector:
Although #(1 2 3) evaluates to a vector in PLT Scheme, it is often better to use (vector 1 2 3).
The syntax #(1 2 3) indicates a literal constant, so it is an error to mutate the vector.
With (vector 1 2 3) the call to vector allocates a new vector, which it is ok to mutate.
Note also that in R5RS you need to quote vector constants, that is you need to write '#(1 2 3).
Finally normal vectors aren't "growable", but see for example the package "evector.plt"
at PLaneT, if you need a growable vector like data structure.
-- JensAxelSoegaard - 21 Jan 2007