smart-unless ( pred false -- )
Factor documentation > Factor handbook > The language > Combinators > Smart combinators
Prev:smart-when ( pred true -- )
Next:smart-if* ( pred true false -- )


Vocabulary
combinators.smart

Inputs and outputs
preda quotation
falsea quotation


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.

Definition
USING: kernel ;

IN: combinators.smart

: smart-unless ( pred false -- ) [ [ ] ] dip smart-if ; inline