-- 配列が空かどうかの判定 -- 引数にnilを渡しても「空」とみなす。 function table.empty (tbl) if tbl==nil then return true end return not next (tbl) end