? ( ? true false -- true/false )
Factor handbook > The language > Combinators > Conditional combinators

Prev:?if ( ..a default cond true: ( ..a cond -- ..b ) false: ( ..a default -- ..b ) -- ..b )
Next:cond ( assoc -- )


Vocabulary
kernel

Inputs and outputs
?a generalized boolean
truean object
falsean object
true/falsetrue or false


Word description
Chooses between two values depending on the boolean value of cond.

Definition

: ? ( ? true false -- true/false ) rot [ drop ] [ nip ] if ;
inline