resize ( n seq -- newseq )
Factor handbook » The language » Collections » Resizable sequence implementation

Prev:growable


Vocabulary
sequences.private

Inputs
na non-negative integer
seqa sequence


Outputs
newseqa new sequence


Word description
Creates a new sequence of the same type as seq with n elements, and copies the contents of seq into the new sequence. If n exceeds the length of seq, the remaining elements are filled with a default value; f for arrays and 0 for strings.

Notes
This generic word is only implemented for strings and arrays.

Definition


Methods