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
preda quotation
truea quotation
falsea quotation


Outputs
None

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

Definition