Created
March 10, 2015 18:00
-
-
Save nefftd/c29f49f7b3c0cbf4a65c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 function cleverinsert(tbl, a, b, ...) | |
if a == nil then return tbl end | |
tbl[a] = b | |
return cleverinsert(tbl, ...) | |
end | |
print( unpack( cleverinsert({}, 1,'a', 2,'b', 3,'c') ) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment