VocabularykernelInputsdefault | an object |
cond | a quotation with stack effect ( ..a default -- ..a new/f ) |
false | a quotation with stack effect ( ..a default -- ..a x ) |
OutputsWord descriptionCalls
cond on the
default object and if
cond outputs a new object. Otherwise, calls
false with the old object.
ExamplesLook up an existing word or make an error pair:
USING: arrays definitions kernel math prettyprint sequences vocabs.parser ;
"+" [ search ] [ "not found" 2array ] ?unless .
+
Try to look up a word that doesn't exist:
USING: arrays definitions kernel math prettyprint sequences vocabs.parser ;
"+++++" [ search ] [ "not found" 2array ] ?unless .
{ "+++++" "not found" }
See also?if,
?whenDefinition