diff options
Diffstat (limited to 'util.lua')
| -rw-r--r-- | util.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -57,6 +57,16 @@ function filter(a, pred) return filtered end +function keys(t) + ks = {} + i = 1 + for k, v in pairs(t) do + ks[i] = k + i += 1 + end + return ks +end + function fmt(x, depth) depth = depth or 1 if (depth > 4) then return "STACK_OVERFLOW" end |
