Next: , Previous: , Up: SRFI-43   [Contents][Index]


7.5.30.6 SRFI-43 Mutators

Scheme Procedure: vector-set! vec i value

Assign the contents of the location at i in vec to value.

Scheme Procedure: vector-swap! vec i j

Swap the values of the locations in vec at i and j.

Scheme Procedure: vector-fill! vec fill [start [end]]

Assign the value of every location in vec between start and end to fill. start defaults to 0 and end defaults to the length of vec.

Scheme Procedure: vector-reverse! vec [start [end]]

Destructively reverse the contents of vec between start and end. start defaults to 0 and end defaults to the length of vec.

Scheme Procedure: vector-copy! target tstart source [sstart [send]]

Copy 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 to 0 and send defaults to the length of source.

Scheme Procedure: vector-reverse-copy! target tstart source [sstart [send]]

Like vector-copy!, but this copies the elements in the reverse order. It is an error if target and source are identical vectors and the target and source ranges overlap; however, if tstart = sstart, vector-reverse-copy! behaves as (vector-reverse! target tstart send) would.