Skip to content

Instantly share code, notes, and snippets.

@semoro
Created May 28, 2016 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semoro/d2ef6dd5e37c358b1fcb43f1cd5b9396 to your computer and use it in GitHub Desktop.
Save semoro/d2ef6dd5e37c358b1fcb43f1cd5b9396 to your computer and use it in GitHub Desktop.
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