Handbook
Glossary
?next ( gen -- val/f end? )
Generators
Prev:
next ( gen -- result )
Next:
skip ( gen -- )
Vocabulary
generators
Inputs
gen
a
generator
Outputs
val/f
an
object
or
f
end?
a
boolean
Word description
A safe version of
next
. Also returns a boolean indicating whether the end of the generator was reached.
Definition
USING:
kernel
;
IN:
generators
:
?next
( gen -- val/f end? )
[
next
f
]
[
drop
f
t
]
catch-stop-generator
;