coro.lua 220 B

12345678910111213
  1. local c = coroutine.wrap(function()
  2. coroutine.yield(10)
  3. coroutine.yield(20)
  4. coroutine.yield(30)
  5. coroutine.yield(40)
  6. end)
  7. return function()
  8. print(c())
  9. print(c())
  10. print(c())
  11. print(c())
  12. end