logoalt Hacker News

ahokatoday at 11:57 AM1 replyview on HN

IIRC generators and co-routines are equivalent in a sense that you can implement one with the other.


Replies

Sharlintoday at 1:16 PM

Generators are a subset of coroutines that only yield data in one direction. Full coroutines can also receive more input from the caller at every yield point.