Handbook
Glossary
unrolled-each-index ( seq len quot: ( x i -- ) -- )
Unrolled sequence iteration combinators
Prev:
unrolled-each ( seq len quot: ( x -- ) -- )
Next:
unrolled-2each ( xseq yseq len quot: ( x y -- ) -- )
Vocabulary
sequences
.
unrolled
Inputs
seq
a
sequence
len
an
integer
quot
a
quotation
with stack effect
( x i -- )
Outputs
None
Word description
Unrolled version of
each-index
that iterates over the first
len
elements of
seq
.
len
must be a compile-time constant. If
seq
has fewer than
len
elements, raises an
unrolled-bounds-error
.
Definition
USING:
sequences.unrolled.private
;
IN:
sequences.unrolled
:
unrolled-each-index
( seq len quot: ( x i -- ) -- )
unrolled-bounds-check
unrolled-each-index-unsafe
;
inline