Created
May 28, 2016 11:54
-
-
Save semoro/d2ef6dd5e37c358b1fcb43f1cd5b9396 to your computer and use it in GitHub Desktop.
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 com = {} | |
local mt = { | |
__index = function(tab, index) | |
return function(arg) | |
print(tostring(index)..arg) | |
end | |
end | |
} | |
setmetatable(com, mt) | |
com.one("two") --out: onetwo | |
com.lol("lol") --out: lollol |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment