Handbook
Glossary
replace-slice ( new from to seq -- seq' )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Subsequences and slices
Prev:
cut-slice ( seq n -- before-slice after-slice )
Vocabulary
sequences
Inputs
new
a
sequence
from
a non-negative integer
to
a non-negative integer
seq
a
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
IN:
sequences
:
replace-slice
( new from to seq -- seq' )
snip-slice
surround
;