<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Aparameters%2Fremove_holes</id>
	<title>Module:parameters/remove holes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Aparameters%2Fremove_holes"/>
	<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:parameters/remove_holes&amp;action=history"/>
	<updated>2026-04-04T11:36:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:parameters/remove_holes&amp;diff=302591&amp;oldid=prev</id>
		<title>Sware: Created page with &quot; -- A helper function that removes empty numeric indexes in a table, -- so that the values are tightly packed like in a normal Lua table. -- equivalent to require(&quot;Module:table&quot;).compressSparseArray return function (t) 	local ret = {} 	local index = 1 	local highest = 0 	for num, _ in pairs(t) do 		if type(num) == &quot;number&quot; and num &gt; 0 and num &lt; math.huge and math.floor(num) == num then 			highest = math.max(highest, num) 		end 	end 	for i = 1, highest do 		if t[i] then...&quot;</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:parameters/remove_holes&amp;diff=302591&amp;oldid=prev"/>
		<updated>2023-05-03T15:10:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; -- A helper function that removes empty numeric indexes in a table, -- so that the values are tightly packed like in a normal Lua table. -- equivalent to require(&amp;quot;Module:table&amp;quot;).compressSparseArray return function (t) 	local ret = {} 	local index = 1 	local highest = 0 	for num, _ in pairs(t) do 		if type(num) == &amp;quot;number&amp;quot; and num &amp;gt; 0 and num &amp;lt; math.huge and math.floor(num) == num then 			highest = math.max(highest, num) 		end 	end 	for i = 1, highest do 		if t[i] then...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
-- A helper function that removes empty numeric indexes in a table,&lt;br /&gt;
-- so that the values are tightly packed like in a normal Lua table.&lt;br /&gt;
-- equivalent to require(&amp;quot;Module:table&amp;quot;).compressSparseArray&lt;br /&gt;
return function (t)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local index = 1&lt;br /&gt;
	local highest = 0&lt;br /&gt;
	for num, _ in pairs(t) do&lt;br /&gt;
		if type(num) == &amp;quot;number&amp;quot; and num &amp;gt; 0 and num &amp;lt; math.huge and math.floor(num) == num then&lt;br /&gt;
			highest = math.max(highest, num)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for i = 1, highest do&lt;br /&gt;
		if t[i] then&lt;br /&gt;
			ret[index] = t[i]&lt;br /&gt;
			index = index + 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
</feed>