cocreate ( quot -- co )


Vocabulary
coroutines

Inputs
quota quotation with stack effect ( value -- )


Outputs
coa coroutine


Word description
Create a new coroutine which will execute the quotation when resumed. The quotation will have an initial value (received from coresume) on the stack when first resumed. Coroutines should never terminate normally by "falling off" the end of the quotation; instead, they should call coterminate.

Definition