surround ( seq1 seq2 seq3 -- newseq )
Factor handbook > The language > Collections > Sequence operations > Appending sequences

Prev:3append-as ( seq1 seq2 seq3 exemplar -- newseq )
Next:glue ( seq1 seq2 seq3 -- newseq )


Vocabulary
sequences

Inputs and outputs
seq1a sequence
seq2a sequence
seq3a sequence
newseqa sequence


Word description
Outputs a new sequence with seq1 inserted between seq2 and seq3.

Examples
USING: sequences prettyprint ; "sssssh" "(" ")" surround .
"(sssssh)"


Definition


: surround ( seq1 seq2 seq3 -- newseq ) swapd 3append ; inline