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

Prev:surround ( seq1 seq2 seq3 -- newseq )
Next:glue ( seq1 seq2 seq3 -- newseq )


Vocabulary
sequences

Inputs
seq1a sequence
seq2a sequence
seq3a sequence
exemplara sequence


Outputs
newseqa sequence


Word description
Outputs a new sequence with seq1 inserted between seq2 and seq3 of the same type as exemplar.

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


See also
surround

Definition


: surround-as ( seq1 seq2 seq3 exemplar -- newseq )
[ swap ] 2dip 3append-as ; inline