-- @runtimes lua54 luajit --- 演示:and/or 返回操作数而不是布尔。 local M = {} --- @return table { value = any, fallback = any, chained = any } function M.run(log) log = log or print local value = 0 or "fallback" local fallback = nil or "default" local chained = "a" and "b" log(("value=%s"):format(tostring(value))) log(("fallback=%s"):format(tostring(fallback))) log(("chained=%s"):format(tostring(chained))) return { value = value, fallback = fallback, chained = chained } end if not ... then M.run() end return M