How generators pause and resumeGenerator 如何暂停与恢复

Each next() resumes at the saved program counter. Both versions yield 1, then return 5.

每次调用 next() 都从保存的程序计数器处接着执行。两个版本都先 yield 出 1,再返回 5。