do ( pred body -- pred body )
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
preda quotation with stack effect ( ..a -- ..b ? )
bodya quotation with stack effect ( ..b -- ..a )


Word description
Executes one iteration of a while or until loop.

Definition

: do ( pred body -- pred body ) dup 2dip ; inline