Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
? ( ? 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
true
an
object
false
an
object
true/false
one 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