?:
Inferred definitions


Vocabulary
syntax.inferred

Syntax
?: name definition... ;


Word description
Defines a word whose stack effect is inferred from its body. The body must have a statically inferable effect. Use an explicit declaration for recursive definitions or combinators with unknown quotation inputs.

Examples
USING: math prettyprint syntax.inferred ; IN: scratchpad ?: add1 1 + ; 4 add1 .
5


Notes
Inference takes place before the new definition is installed. The word otherwise behaves like an ordinary definition, including dependency tracking and subsequent redefinition.

Definition