generators vocabulary
Factor handbook ยป Vocabulary index


Documentation
Generators

Metadata
Tags:extensions
Authors:Keldan Chapman


Words

Tuple classes
ClassSuperclassSlots
generator tuplestate
has-inputs tuple
stop-generator tuple


Parsing words
WordSyntax
GEN:GEN: word ( stack -- generator ) definition... ;
GEN::GEN:: word ( stack -- generator ) definition... ;


Ordinary words
WordStack 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
WordStack effect
generator?( object -- ? )
has-inputs?( object -- ? )
stop-generator?( object -- ? )


Files


Metadata files