<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pttlink.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AFunc</id>
	<title>Module:Func - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pttlink.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AFunc"/>
	<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Module:Func&amp;action=history"/>
	<updated>2026-05-05T01:36:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Module:Func&amp;diff=11315&amp;oldid=prev</id>
		<title>Kg7qin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Module:Func&amp;diff=11315&amp;oldid=prev"/>
		<updated>2022-01-24T08:03:44Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:03, 24 January 2022&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key mediawiki:diff::1.12:old-11314:rev-11315 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kg7qin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Module:Func&amp;diff=11314&amp;oldid=prev</id>
		<title>Mediawiki&gt;ExE Boss: Copied from mw:Module:Func</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Module:Func&amp;diff=11314&amp;oldid=prev"/>
		<updated>2021-08-27T16:56:57Z</updated>

		<summary type="html">&lt;p&gt;Copied from &lt;a href=&quot;https://www.mediawiki.org/wiki/Module:Func&quot; class=&quot;extiw&quot; title=&quot;mw:Module:Func&quot;&gt;mw:Module:Func&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
-- This module provies helper functions for manipulating Lua functions.&lt;br /&gt;
--&lt;br /&gt;
-- @module func&lt;br /&gt;
-- @alias  p&lt;br /&gt;
-- @author ExE Boss&lt;br /&gt;
-- @require [[Module:No globals]]&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
require(&amp;quot;Module:No globals&amp;quot;);&lt;br /&gt;
local checkTypeMulti = require(&amp;quot;libraryUtil&amp;quot;).checkTypeMulti;&lt;br /&gt;
&lt;br /&gt;
local p = {};&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Creates a bound function that calls `func` with the varargs passed to `bind`&lt;br /&gt;
-- preceding the varargs passed to the newly created bound function.&lt;br /&gt;
--&lt;br /&gt;
-- @param {function} func&lt;br /&gt;
-- @param {any} ...&lt;br /&gt;
-- @return {function}&lt;br /&gt;
-- @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
function p.bind(func, ...)&lt;br /&gt;
	checkTypeMulti(&amp;quot;bind&amp;quot;, 1, func, { &amp;quot;table&amp;quot;, &amp;quot;function&amp;quot; });&lt;br /&gt;
&lt;br /&gt;
	local len = select(&amp;quot;#&amp;quot;, ...);&lt;br /&gt;
	local args = {...};&lt;br /&gt;
&lt;br /&gt;
	return function(...)&lt;br /&gt;
		return func(unpack(args, 1, len), ...);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p;&lt;/div&gt;</summary>
		<author><name>Mediawiki&gt;ExE Boss</name></author>
	</entry>
</feed>