<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://compusofia.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AForeach</id>
	<title>Module:Foreach - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://compusofia.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AForeach"/>
	<link rel="alternate" type="text/html" href="https://compusofia.com/w/index.php?title=Module:Foreach&amp;action=history"/>
	<updated>2026-04-23T10:35:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://compusofia.com/w/index.php?title=Module:Foreach&amp;diff=560&amp;oldid=prev</id>
		<title>Majestix: 1 revision imported: Initial Setup</title>
		<link rel="alternate" type="text/html" href="https://compusofia.com/w/index.php?title=Module:Foreach&amp;diff=560&amp;oldid=prev"/>
		<updated>2026-04-06T12:12:54Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Initial Setup&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:12, 6 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Majestix</name></author>
	</entry>
	<entry>
		<id>https://compusofia.com/w/index.php?title=Module:Foreach&amp;diff=559&amp;oldid=prev</id>
		<title>en&gt;Uzume: fix when there are nonnumeric args; frame:argumentPairs is marked as &quot;Included for backwards compatibility&quot; and same as &quot;pairs&quot; but we want &quot;ipairs&quot;</title>
		<link rel="alternate" type="text/html" href="https://compusofia.com/w/index.php?title=Module:Foreach&amp;diff=559&amp;oldid=prev"/>
		<updated>2019-10-13T19:31:20Z</updated>

		<summary type="html">&lt;p&gt;fix when there are nonnumeric args; frame:argumentPairs is marked as &amp;quot;Included for backwards compatibility&amp;quot; and same as &amp;quot;pairs&amp;quot; but we want &amp;quot;ipairs&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Replace http://www.mediawiki.org/wiki/Template:Foreach&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.w(frame)&lt;br /&gt;
-- called from Template:Fe&lt;br /&gt;
&lt;br /&gt;
    local pframe = frame:getParent() &lt;br /&gt;
    local tplname = pframe.args[1]   &lt;br /&gt;
    local delim = pframe.args[2]&lt;br /&gt;
 &lt;br /&gt;
    r = &amp;#039;&amp;#039;&lt;br /&gt;
    for n,v in ipairs(pframe.args) do&lt;br /&gt;
       if n &amp;gt; 3 then&lt;br /&gt;
            r = r .. delim&lt;br /&gt;
        end&lt;br /&gt;
       if n&amp;gt;2 then r = r .. frame:expandTemplate{title = tplname, args = {v}} end&lt;br /&gt;
    end&lt;br /&gt;
    return r&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.m(t,frame)&lt;br /&gt;
-- to be called from a module&lt;br /&gt;
-- at the top: p={foreach = require &amp;quot;Module:foreach&amp;quot;}&lt;br /&gt;
-- example: p.foreach.m({tplname,&amp;#039;, &amp;#039;,item1,item3,item3},frame)&lt;br /&gt;
&lt;br /&gt;
    r = &amp;#039;&amp;#039;&lt;br /&gt;
    tplname=t[1]&lt;br /&gt;
    delim=t[2]&lt;br /&gt;
    for n,v in ipairs(t) do&lt;br /&gt;
       if n &amp;gt; 3 then&lt;br /&gt;
            r = r .. delim&lt;br /&gt;
        end&lt;br /&gt;
     if n&amp;gt;2 then r = r .. frame:expandTemplate{title = tplname, args = {v}} end&lt;br /&gt;
    end&lt;br /&gt;
    return r&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>en&gt;Uzume</name></author>
	</entry>
</feed>