📅  最后修改于: 2022-03-11 14:54:55.847000             🧑  作者: Mango
function switch(caselist, case)
assert(type(caselist), "Not a table")
if(caselist[case])then
assert(type(caselist[case]), "Not a function")
caselist[case]()
end
end