Diff

util/array.lua @ 13138:0b0cefce6e42 0.12

util.array: Expose new() on module table For consistency with other utils. Consistency is good.
author Kim Alvefur <zash@zash.se>
date Sat, 10 Jun 2023 12:14:12 +0200
parent 11787:3ae6fa901a8b
child 13141:451cb119026e
child 13247:1bb4aa803b32
line wrap: on
line diff
--- a/util/array.lua	Wed May 31 14:08:19 2023 +0200
+++ b/util/array.lua	Sat Jun 10 12:14:12 2023 +0200
@@ -35,6 +35,8 @@
 	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);