--- lam.types local types = {} function types.Type(x) if type(x) == "string" then -- Symbols are Lua strings return "Symbol" elseif type(x) == "number" then -- Numbers are Lua numbers return "Number" elseif x.__type then return x.__type elseif type(x) == "table" then -- Lists are Lua tables (non-adorned) return "List" else return type(x) end end types.Object = { __type = "Object" } function types.Object:new(o) o = o or {} setmetatable(o, self) self.__index = self return o end --- Boxed types -- Strings -- Lists --- return types