pad-tail ( seq n elt -- padded )
Factor handbook > The language > Collections > Sequence operations > Appending sequences

Prev:pad-head ( seq n elt -- padded )


Vocabulary
sequences

Inputs and outputs
seqa sequence
na non-negative integer
eltan object
paddeda new sequence


Word description
Outputs a new sequence consisting of seq padded on the right with enough repetitions of elt to have the result be of length n.

Examples
USING: io sequences ; { "ab" "quux" } [ 5 CHAR: - pad-tail print ] each
ab--- quux-


Definition

: pad-tail ( seq n elt -- padded ) [ append ] padding ;