Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
do ( pred body -- pred body )
Factor documentation
>
Factor handbook
>
The language
>
Combinators
>
Looping combinators
Prev:
until ( ..a pred: ( ..a -- ..b ? ) body: ( ..b -- ..a ) -- ..b )
Next:
loop ( ... pred: ( ... -- ... ? ) -- ... )
Vocabulary
kernel
Inputs and outputs
pred
a
quotation
with stack effect
( ..a -- ..b ? )
body
a
quotation
with stack effect
( ..b -- ..a )
Word description
Executes one iteration of a
while
or
until
loop.
Definition
IN:
kernel
:
do
( pred body -- pred body )
dup
2dip
;
inline