Vocabulary
sequences

Inputs
newa sequence
froma non-negative integer
toa non-negative integer
seqa sequence


Outputs
seq'a sequence


Word description
Replaces a range of elements beginning at index from and ending before index to with a new sequence.

Errors
Throws an error if new contains elements whose types are not permissible in seq.

Definition

: replace-slice ( new from to seq -- seq' )
snip-slice surround ;