each-integer-from ( ... from to quot: ( ... i -- ... ) -- ... )


Vocabulary
math

Inputs
froman integer
toan integer
quota quotation


Outputs
None

Word description
Applies the quotation to each integer in [from..to) in order.

Definition


: each-integer-from
( ... from to quot: ( ... i -- ... ) -- ... )
2over <
[ [ nip call ] 3keep [ 1 + ] 2dip each-integer-from ]
[ 3drop ] if ; inline recursive