LAZY:


Vocabulary
promises

Syntax
LAZY: word ( stack -- effect ) definition... ;


Inputs
None

Outputs
None

Word description
Creates a lazy word in the current vocabulary. When executed the word will return a promise that when forced, executes the word definition. Any values on the stack that are required by the word definition are captured along with the promise.

Examples
USING: arrays sequences prettyprint promises ; IN: scratchpad LAZY: zeroes ( -- pair ) 0 zeroes 2array ; zeroes force second force first .
0


Definition