prepend-as ( seq1 seq2 exemplar -- newseq )


Vocabulary
sequences

Inputs
seq1a sequence
seq2a sequence
exemplara sequence


Outputs
newseqa sequence


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

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

Examples
USING: prettyprint sequences ; { 3 4 } B{ 1 2 } B{ } prepend-as .
B{ 1 2 3 4 }

USING: prettyprint sequences strings ; "ing" "go" SBUF" " prepend-as .
SBUF" going"


See also
prepend

Definition


: prepend-as ( seq1 seq2 exemplar -- newseq )
swapd append-as ; inline