Handbook
Glossary
direct-slice ( from to seq -- seq' )
Factor handbook
»
The language
»
Collections
»
Specialized arrays
»
Specialized array words
Next:
direct-head ( seq n -- seq' )
Vocabulary
specialized-arrays
Inputs
from
an
integer
to
an
integer
seq
a specialized array
Outputs
seq'
a new specialized array
Word description
Constructs a new specialized array of the same type as
seq
sharing the same underlying memory as the subsequence of
seq
from elements
from
up to but not including
to
. Like
slice
, raises an error if
from
or
to
is out of bounds.
See also
direct-head
,
direct-tail
,
direct-head*
,
direct-tail*
Definition
USING:
sequences
specialized-arrays.private
;
IN:
specialized-arrays
:
direct-slice
( from to seq -- seq' )
check-slice
direct-slice-unsafe
;
inline