Miscellany
public lua v1 · immutablegame = {updates = {}}function game:update () local updated = false for i, v in pairs(self.updates) do updated = true if not coroutine.resume(v) then self.updates[i] = nil end end return updatedendfunction game:run () while self:update() do endendgame.updates.example =coroutine.create( function () for i = 1, 10 do print(i) coroutine.yield() end end)game:run()--[[10987654321]]