LAZY:


Vocabulary
lazy

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


Inputs and outputs
worda new word to define
definitiona word definition


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

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


Definition