Handbook
Glossary
generators vocabulary
Factor handbook
ยป
Vocabulary index
Documentation
Generators
Metadata
Tags:
extensions
Authors:
Keldan Chapman
Words
Tuple classes
Class
Superclass
Slots
generator
tuple
state
has-inputs
tuple
stop-generator
tuple
Parsing words
Word
Syntax
GEN:
GEN: word ( stack -- generator ) definition... ;
GEN::
GEN:: word ( stack -- generator ) definition... ;
Ordinary words
Word
Stack effect
<generator>
( quot -- gen )
?next
( gen -- val/f end? )
?next*
( v gen -- val/f end? )
assert-no-inputs
( quot -- )
catch-stop-generator
( ..a try: ( ..a -- ..b ) except: ( ..a -- ..b ) -- ..b )
exhausted?
( gen -- ? )
gen-coroutine
( quot gen -- co )
has-inputs
( -- * )
make-gen-quot
( quot effect -- quot )
next
( gen -- result )
next*
( v gen -- result )
skip
( gen -- )
skip*
( v gen -- )
stop-generator
( -- * )
take
( gen n -- seq )
take-all
( gen -- seq )
yield
( v -- )
yield*
( v -- result )
yield-from
( gen -- )
Class predicate words
Word
Stack effect
generator?
( object -- ? )
has-inputs?
( object -- ? )
stop-generator?
( object -- ? )
Files
resource:extra/generators/generators.factor
resource:extra/generators/generators-docs.factor
resource:extra/generators/generators-tests.factor
Metadata files
resource:extra/generators/authors.txt
resource:extra/generators/summary.txt
resource:extra/generators/tags.txt