all-integers? ( ... n quot: ( ... i -- ... ? ) -- ... ? )


Vocabulary
math

Inputs
nan integer
quota quotation with stack effect ( ... i -- ... ? )


Outputs
?a boolean


Word description
Applies the quotation to each integer from 0 up to n, excluding n. Iteration stops when the quotation outputs f or the end is reached. If the quotation yields a false value for some integer, this word outputs f. Otherwise, this word outputs t.

Notes
This word is used to implement all?.

Definition


: all-integers? ( ... n quot: ( ... i -- ... ? ) -- ... ? )
[ 0 ] 2dip all-integers-from? ; inline