smart-unless* ( pred false -- )
Factor handbook » The language » Combinators » Smart combinators

Prev:smart-when* ( pred true -- )


Vocabulary
combinators.smart

Inputs
preda quotation
falsea quotation


Outputs
None

Word description
A version of unless that takes two quotations, where the first quotation is a predicate that preserves any inputs it consumes and the second is the false branch. If the true branch is taken, the values are left on the stack. If the false branch is taken, the number of inputs inferred from predicate quotation is dropped and the quotation is called.

Definition