aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/array.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/array.lua b/util/array.lua
index 072b24a7..11ff651c 100644
--- a/util/array.lua
+++ b/util/array.lua
@@ -52,6 +52,14 @@ function array:reverse()
end
end
+function array:append(array)
+ local len,len2 = #self, #array;
+ for i=1,len2 do
+ self[len+i] = array[i];
+ end
+ return self;
+end
+
function array.collect(f, s, var)
local t, var = {};
while true do