摘要:
local function foo(a) print("foo: ", a) return coroutine.yield(2 * a) end local co = coroutine.create(foo) print(coroutine.resume(co, 1)) -- true, 2 * 阅读全文
摘要:
展开表: local extract extract = function (t, key, ...) -- print("extract key: ", key, type(t), t) if not key then return t end if not t then return nil e 阅读全文
摘要:
local function f(x, y) print("f args: ", x, y) error("f error") -- raise error end -- 1 local function error_handler(err) print(err) return debug.trac 阅读全文