unrolled-map ( seq len quot: ( x -- newx ) -- newseq )
Unrolled sequence iteration combinators

Prev:unrolled-2each ( xseq yseq len quot: ( x y -- ) -- )
Next:unrolled-map-index ( seq len quot: ( x i -- newx ) -- newseq )


Vocabulary
sequences.unrolled

Inputs
seqa sequence
lenan integer
quota quotation with stack effect ( x -- newx )


Outputs
newseqa sequence


Word description
Unrolled version of map that maps 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


: unrolled-map ( seq len quot: ( x -- newx ) -- newseq )
pick unrolled-map-as ; inline