Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
while ( ..a pred: ( ..a -- ..b ? ) body: ( ..b -- ..a ) -- ..b )
Factor documentation
>
Factor handbook
>
The language
>
Combinators
>
Looping combinators
Next:
until ( ..a pred: ( ..a -- ..b ? ) body: ( ..b -- ..a ) -- ..b )
Vocabulary
kernel
Inputs and outputs
pred
a
quotation
with stack effect
( ..a -- ..b ? )
body
a
quotation
with stack effect
( ..b -- ..a )
Word description
Calls
body
until
pred
returns
f
.
Definition
IN:
kernel
:
while
( ..a pred: ( ..a -- ..b ? ) body: ( ..b -- ..a ) -- ..b )
swap
do
compose
[
loop
]
curry
when
;
inline