This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function try_get_upvalue(func, name) | |
local upvalue_index = 1 | |
while true do | |
local u_name, u_value = debug.getupvalue(func, upvalue_index) | |
if not u_name then | |
break | |
elseif u_name == name then | |
return u_name, u_value, upvalue_index | |
end | |
upvalue_index = upvalue_index + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- desc big int add & mul | |
-- maintainer hugoyu | |
local big_int = {} | |
local min_add_digit_num = 9 | |
local min_mul_digit_num = 5 | |
local function digit_num(v) | |
return #tostring(v) |
OlderNewer