(
Factor handbook » The language » Syntax » Literals » Stack effect syntax


Vocabulary
syntax

Syntax
( inputs -- outputs )


Inputs
None

Outputs
None

Word description
Literal stack effect syntax. Also used by syntax words (such as :), typically declaring the stack effect of the word definition which follows.

Notes
Useful for meta-programming with define-declared.

Examples
USING: compiler.units kernel math prettyprint random words ; IN: scratchpad SYMBOL: my-dynamic-word [ my-dynamic-word 2 { [ + ] [ * ] } random curry ( x -- y ) define-declared ] with-compilation-unit 2 my-dynamic-word .
4


See also
Stack effect declarations

Definition