Appending sequences
Factor handbook > The language > Collections > Sequence operations

Prev:Adding and removing sequence elements
Next:Subsequences and slices


Basic append operations:
append ( seq1 seq2 -- newseq )

append-as ( seq1 seq2 exemplar -- newseq )

prepend ( seq1 seq2 -- newseq )

3append ( seq1 seq2 seq3 -- newseq )

3append-as ( seq1 seq2 seq3 exemplar -- newseq )

surround ( seq1 seq2 seq3 -- newseq )

glue ( seq1 seq2 seq3 -- newseq )


Collapse a sequence unto itself:
concat ( seq -- newseq )

join ( seq glue -- newseq )


A pair of words useful for aligning strings:
pad-head ( seq n elt -- padded )

pad-tail ( seq n elt -- padded )