Next: dynamic arrays folding, Previous: dynamic arrays inspection, Up: dynamic arrays [Index]
The following syntactic bindings are exported by the library
(vicare containers dynamic-arrays)
. The syntactic bindings whose name
is prefixed with $
are unsafe operations: they do not
validate their arguments before accessing them.
Return the object at idx in the dynamic array. Raise an assertion violation if arry is empty.
Store a new value at idx in the dynamic array, overwriting the old value.
Insert a new value at idx in the dynamic array. The objects in the array are shifted to make room for the new one.
The argument idx must be a non–negative fixnum in the range [0, N) where N is the number of objects in the array; as special cases:
(let ((D (dynamic-array 0 1 2 3))) (dynamic-array-insert! D 0 9) (dynamic-array->list D)) ⇒ (9 0 1 2 3) (let ((D (dynamic-array 0 1 2 3))) (dynamic-array-insert! D 3 9) (dynamic-array->list D)) ⇒ (0 1 2 9 3)
Remove the object at index idx in arry.
(let ((D (dynamic-array 0 1 2 3 4))) (dynamic-array-remove! D 2) (dynamic-array->list D)) ⇒ (0 1 3 4)
Return the object at the front of the dynamic array. Raise an assertion violation if arry is empty.
Return the object at the rear of the dynamic array. Raise an assertion violation if arry is empty.
Push obj on the front of arry.
Push obj on the rear of arry.
Remove the object at the front of the dynamic array and return it. Raise an assertion violation if arry is empty.
Remove the object at the rear of the dynamic array and return it. Raise an assertion violation if arry is empty.
Remove all the elements from arry.
Next: dynamic arrays folding, Previous: dynamic arrays inspection, Up: dynamic arrays [Index]