Last active
August 23, 2017 09:15
-
-
Save akornatskyy/9e6732db06cdd2c8515fa32fa21221d4 to your computer and use it in GitHub Desktop.
Lua: How to copy table
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 table_copy(t) | |
| local r = {} | |
| for k, v in next, t do | |
| r[k] = v | |
| end | |
| return r | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment