join-as ( seq glue exemplar -- newseq )


Vocabulary
sequences

Inputs and outputs
seqa sequence
gluea sequence
exemplara sequence
newseqa sequence


Word description
Concatenates a sequence of sequences together into one sequence, placing a copy of glue between each pair of sequences. The resulting sequence is of the same class as glue.

Notes
If the glue sequence is empty, this word calls concat-as.

Examples
Join a list of strings as a string buffer:
USING: sequences prettyprint ; { "a" "b" "c" } "1" SBUF" "join-as .
SBUF" a1b1c"


Errors
Throws an error if one of the sequences in seq contains elements not permitted in sequences of the same class as exemplar.

See also
join, concat, concat-as

Definition