Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 03/12/2016
- --Last update: 03/12/2016
- --[[ Notes:
- Does:
- Possibilita o uso de "variavel < "letra""
- Contém bugs.
- ]]--
- local notTable = {}
- _G = setmetatable(_G,{
- __index = function(list,index)
- if notTable[index] then
- return list[index][1]
- else
- return list[index]
- end
- end,
- __newindex = function(list,index,value)
- local v = value
- if type(value) ~= "table" then
- v = {v}
- notTable[index] = true
- end
- rawset(list,index,setmetatable(v,{
- __lt = function(n1,n2)
- if type(n1) == "string" then
- return n1:byte() < n2[1]
- else
- return n1[1] < n2:byte()
- end
- end
- }))
- end
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement