<?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%3Atable%2FnumKeys</id>
	<title>Module:table/numKeys - 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%3Atable%2FnumKeys"/>
	<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:table/numKeys&amp;action=history"/>
	<updated>2026-04-05T23:09:36Z</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:table/numKeys&amp;diff=475297&amp;oldid=prev</id>
		<title>Sware: Created page with &quot;local math_module = &quot;Module:math&quot;  local pairs = pairs local sort = table.sort  local function is_positive_integer(...) 	is_positive_integer = require(math_module).is_positive_integer 	return is_positive_integer(...) end  --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) 	local nums, i = {}, 0 	for k in pairs(t) do 		if is_positive_integer(k)...&quot;</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:table/numKeys&amp;diff=475297&amp;oldid=prev"/>
		<updated>2025-11-04T21:29:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local math_module = &amp;quot;Module:math&amp;quot;  local pairs = pairs local sort = table.sort  local function is_positive_integer(...) 	is_positive_integer = require(math_module).is_positive_integer 	return is_positive_integer(...) end  --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) 	local nums, i = {}, 0 	for k in pairs(t) do 		if is_positive_integer(k)...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local math_module = &amp;quot;Module:math&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local pairs = pairs&lt;br /&gt;
local sort = table.sort&lt;br /&gt;
&lt;br /&gt;
local function is_positive_integer(...)&lt;br /&gt;
	is_positive_integer = require(math_module).is_positive_integer&lt;br /&gt;
	return is_positive_integer(...)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[==[&lt;br /&gt;
Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==]&lt;br /&gt;
return function(t, keySort)&lt;br /&gt;
	local nums, i = {}, 0&lt;br /&gt;
	for k in pairs(t) do&lt;br /&gt;
		if is_positive_integer(k) then&lt;br /&gt;
			i = i + 1&lt;br /&gt;
			nums[i] = k&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- No need for [[Module:math/compare]], as the default is adequate for integers.&lt;br /&gt;
	sort(nums, keySort)&lt;br /&gt;
	return nums&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
</feed>