Handbook
Glossary
next ( gen -- result )
Generators
Next:
?next ( gen -- val/f end? )
Vocabulary
generators
Inputs
gen
a
generator
Outputs
result
an
object
Word description
Resume computation in the generator until the next value is produced.
Definition
USING:
accessors
coroutines
kernel
;
IN:
generators
:
next
( gen -- result )
state>>
[
*coresume
]
[
stop-generator
]
if*
;