Next: , Up: iklib vectors   [Index]


6.28.1 Vector constructors

Function: vector-append vec

Return a newly allocated vector whose items form the concatenation of the given vectors.

Function: vector-resize vec new-length
Function: vector-resize vec new-length fill

Return a new vector of length new-length whose first slots are filled with the items from vec and whose last slots, if any left, are filled with fill. When not used: fill defaults to #f.

(vector-resize '#() 0)          ⇒ #()
(vector-resize '#() 3)          ⇒ #(#f #f #f)
(vector-resize '#(1 2 3) 5)     ⇒ #(1 2 3 #f #f)
(vector-resize '#(1 2 3) 2)     ⇒ #(1 2)