[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.1.11 Vectors
Vectors are not autoquoted objects.
- library procedure: vector-fill! vector obj
Stores obj in every element of vector. For instance:
(let ((v (make-vector 5 #f))) (vector-fill! v #t) v)
- bigloo procedure: copy-vector vector len
Allocate a new vector of size len and fills it with the first len element of vector. The new length len may be bigger than the old vector length.
- bigloo procedure: vector-copy vector start end
vector must be a vector, and start and end must be exact integers satisfying:
0 <= START <= END <= (vector-length VECTOR)
vector-copy
returns a newly allocated vector formed from the elements of VECTOR beginning with index START (inclusive) and ending with index END (exclusive).(vector-copy '#(1 2 3 4) 0 4) ⇒ '#(1 2 3 4) (vector-copy '#(1 2 3 4) 1 3) ⇒ '#(2 3)
- bigloo procedure: vector-copy! target tstart source [sstart [send]]
-
Copies a block of elements from source to target, both of which must be vectors, starting in target at tstart and starting in source at sstart, ending when send - sstart elements have been copied. It is an error for target to have a length less than
tstart + (send - sstart)
. Sstart defaults to0
and send defaults to the length of source.
See section r5rs.info, for more details.
- bigloo procedure: vector-append vector …
-
Returns a newly allocated vector that contains all elements in order from the subsequent locations in vector ….
Examples:
(vector-append '#(x) '#(y)) ⇒ #(x y) (vector-append '#(a) '#(b c d)) ⇒ #(a b c d) (vector-append '#(a #(b)) '#(#(c))) ⇒ #(a #(b) #(c))
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on October 23, 2011 using texi2html 5.0.