Handbook
Glossary
all-integers-from? ( ... from to quot: ( ... i -- ... ? ) -- ... ? )
Vocabulary
math
Inputs
from
an
integer
to
an
integer
quot
a
quotation
Outputs
?
a
boolean
Word description
Applies the quotation to each integer in
[from..to)
, returning
t
if all results are true, and
f
otherwise.
Definition
USING:
kernel
;
IN:
math
:
all-integers-from?
( ... from to quot: ( ... i -- ... ? ) -- ... ? )
2over
<
[
[
nip
call
]
3check
[
[
1
+
]
2dip
all-integers-from?
]
[
3drop
f
]
if
]
[
3drop
t
]
if
;
inline
recursive