VocabularysequencesInputsn | a non-negative integer |
seq | a resizable sequence |
OutputsNone
Generic word contractResizes a sequence. The initial contents of the new area is undefined.
ErrorsThrows a
no-method error if the sequence is not resizable, and a
bounds-error if the new length is negative.
Side effectsModifies
seqExamplesUSING: kernel prettyprint sequences ;
6 V{ 1 2 3 } [ set-length ] keep .
V{ 1 2 3 0 0 0 }
USING: kernel prettyprint sequences ;
3 V{ 1 2 3 4 5 6 } [ set-length ] keep .
V{ 1 2 3 }
DefinitionMethods