Handbook
Glossary
<promise> ( quot -- promise )
Vocabulary
promises
Inputs
quot
a
quotation
with stack effect
( -- x )
Outputs
promise
a promise object
Word description
Creates a promise to return a value. When forced this quotation is called and the value returned. The value is memorized so that calling
force
again does not call the quotation again, instead the previous value is returned directly.
Definition
USING:
kernel
;
IN:
promises
:
<promise>
( quot -- promise )
f
f
promise
boa
;