until ( ..a pred: ( ..a -- ..b ? ) body: ( ..b -- ..a ) -- ..b )
Factor handbook » The language » Combinators » Looping combinators

Prev:while ( ..a pred: ( ..a -- ..b ? ) body: ( ..b -- ..a ) -- ..b )
Next:do ( pred body -- pred body )


Vocabulary
kernel

Inputs
preda quotation with stack effect ( ..a -- ..b ? )
bodya quotation with stack effect ( ..b -- ..a )


Outputs
None

Word description
Calls body until pred returns t.

Definition

: until
( ..a pred: ( ..a -- ..b ? ) body: ( ..b -- ..a ) -- ..b )
[ negate ] dip while ; inline