a quotation with stack effect ( ..a default -- ..a new/f )
true
a quotation with stack effect ( ..a new -- ..a x )
Outputs
default/x
default or x
Word description Calls cond on the default object and if cond outputs a new object then the true quotation is called with that new object. Otherwise, leaves the old object on the stack.
Examples Look up an existing word or make an error pair:
USING: arrays definitions kernel math prettyprint sequences vocabs.parser ;
"+" [ search ] [ where first ] ?when . "resource:core/math/math.factor"
Try to look up a word that doesn't exist:
USING: arrays definitions kernel math prettyprint sequences vocabs.parser ;
"+++++" [ search ] [ where first ] ?when . "+++++"