User Tools


Function VECTOR

Syntax

  • vector &rest objectsvector

Arguments and Values

Description

Creates a fresh simple general vector whose size corresponds to the number of objects.

The vector is initialized to contain the objects.

Examples

(defparameter *v* (vector 1 2 'sirens))

*V*

(arrayp *v*)

true

(vectorp *v*)

true

(simple-vector-p *v*)

true

(length *v*)

3

Side Effects

None.

Affected By

None.

Exceptional Situations

None.

See Also

Notes

vector is analogous to list.

(vector a1 a2 ... an) ≡ (make-array ([CL:Functions:list]] n) :element-type t :initial-contents (list a1 a2 ... an)))