append ( seq1 seq2 -- newseq )
Factor documentation > Factor handbook > The language > Collections > Sequence operations > Appending sequences
Next:append-as ( seq1 seq2 exemplar -- newseq )


Vocabulary
sequences

Inputs and outputs
seq1a sequence
seq2a sequence
newseqa sequence


Word description
Outputs a new sequence of the same type as seq1 consisting of the elements of seq1 followed by seq2.

Errors
Throws an error if seq2 contains elements not permitted in sequences of the same class as seq1.

Examples
USING: prettyprint sequences ; { 1 2 } B{ 3 4 } append .
{ 1 2 3 4 }

USING: prettyprint sequences strings ; "go" "ing" append .
"going"


See also
append-as

Definition
USING: kernel ;

IN: sequences

: append ( seq1 seq2 -- newseq ) over append-as ;