Handbook
Glossary
?1if ( ..a x pred: ( ..a x quot: ( ..a x -- ..b ? ) -- ..b x ? ) true: ( ..b x -- ..c ) false: ( ..b x -- ..c ) -- ..c )
Vocabulary
combinators
.
extras
Inputs
x
an
object
pred
a
quotation
with stack effect
( ..a x quot: ( ..a x -- ..b ? ) -- ..b x ? )
true
a
quotation
with stack effect
( ..b x -- ..c )
false
a
quotation
with stack effect
( ..b x -- ..c )
Outputs
None
Definition
USING:
kernel
;
IN:
combinators.extras
:
?1if
( ..a x pred: ( ..a x quot: ( ..a x -- ..b ? ) -- ..b x ? ) true: ( ..b x -- ..c ) false: ( ..b x -- ..c ) -- ..c )
[
?1guard
]
2dip
if
;
inline