Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 548 Bytes

vector.md

File metadata and controls

11 lines (8 loc) · 548 Bytes

vector

(vector &rest elements)

Creates and returns a fresh rank-1 array containing the given elements, evaluated left to right; (vector) returns an empty vector #(). It is equivalent to make-array with the element count as the dimension followed by aref-style stores, but in one step. Like make-array and aref, vector is not a first-class function value -- #'vector is unavailable, so call it directly.

(vector 1 2 3) ; => #(1 2 3)
(vector) ; => #()
(aref (vector 10 20 30) 2) ; => 30