? ( ? true false -- true/false )
Factor documentation > 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/falseone two input objects


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

Definition
IN: kernel

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