Handbook
Glossary
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 )
surround-as
( seq1 seq2 seq3 exemplar -- newseq )
glue
( seq1 seq2 seq3 -- newseq )
glue-as
( seq1 seq2 seq3 exemplar -- newseq )
Collapse a sequence unto itself:
concat
( seq -- newseq )
concat-as
( seq exemplar -- newseq )
join
( seq glue -- newseq )
join-as
( seq glue exemplar -- newseq )
A pair of words useful for aligning strings:
pad-head
( seq n elt -- padded )
pad-tail
( seq n elt -- padded )