append ( seq1 seq2 -- newseq )
Factor handbook » The language » Collections » Sequence operations » Appending sequences

Next:append-as ( seq1 seq2 exemplar -- newseq )


Vocabulary
sequences

Inputs
seq1a sequence
seq2a sequence


Outputs
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, append!, 3append, 3append-as, push-all

Definition


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