Handbook
Glossary
?next* ( v gen -- val/f end? )
Generators
Prev:
next* ( v gen -- result )
Next:
skip* ( v gen -- )
Vocabulary
generators
Inputs
v
an
object
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*
( v gen -- val/f end? )
[
next*
f
]
[
2drop
f
t
]
catch-stop-generator
;