shorten_array
shorten_array — reduces or expands the size of an array.
shorten_array (array, size)
arrayThe array to shorten or expand.
sizeThe new length for the array.
The resized array.
This function reduces or expands the size of an array by cutting off any
elements which extend beyond the given size, or by adding nils to the end of the
array until the new size is reached. This function is analogous to the C
function, realloc.
Gamma>a = array (1,2,3,4,5);[1 2 3 4 5]Gamma>shorten_array(a,3);[1 2 3]Gamma>shorten_array(a,9);[1 2 3 nil nil nil nil nil nil]Gamma>