smart-if ( pred true false -- )
Factor handbook > The language > Combinators > Smart combinators

Prev:keep-inputs ( quot -- )
Next:smart-when ( pred true -- )


Vocabulary
combinators.smart

Inputs and outputs
preda quotation
truea quotation
falsea quotation


Word description
A version of if that takes three quotations, where the first quotation is a predicate that preserves any inputs it consumes.

Definition