+-- Prosody IM
+-- Copyright (C) 2008-2009 Matthew Wild
+-- Copyright (C) 2008-2009 Waqas Hussain
+--
+-- This project is MIT/X11 licensed. Please see the
+-- COPYING file in the source package for more information.
+--
+
local array = {};
local array_mt = { __index = array, __tostring = function (array) return array:concat(", "); end };
return setmetatable(t or {}, array_mt);
end
+function array_mt.__add(a1, a2)
+ local res = new_array();
+ return res:append(a1):append(a2);
+end
+
setmetatable(array, { __call = new_array });
function array:map(func, t2)