util.array: Expose new() on module table

For consistency with other utils.

Consistency is good.
0.12
Kim Alvefur 3 years ago
parent e4d5c15396
commit cbed7dfdf5
  1. 2
      util/array.lua

@ -35,6 +35,8 @@ local function new_array(self, t, _s, _var)
return setmetatable(t or {}, array_mt);
end
array.new = new_array;
function array_mt.__add(a1, a2)
local res = new_array();
return res:append(a1):append(a2);

Loading…
Cancel
Save