<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki42.maceys.net/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://wiki42.maceys.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AFunc"/>
	<link rel="alternate" type="text/html" href="https://wiki42.maceys.net/index.php?title=Module:Func&amp;action=history"/>
	<updated>2026-04-14T11:00:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki42.maceys.net/index.php?title=Module:Func&amp;diff=411&amp;oldid=prev</id>
		<title>Lynn: Created page with &quot;-------------------------------------------------------------------------------- -- This module provies helper functions for manipulating Lua functions. -- -- @module func -- @alias  p -- @author ExE Boss --------------------------------------------------------------------------------  require(&quot;strict&quot;); local checkTypeMulti = require(&quot;libraryUtil&quot;).checkTypeMulti;  local p = {};  -------------------------------------------------------------------------------- -- Creates...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki42.maceys.net/index.php?title=Module:Func&amp;diff=411&amp;oldid=prev"/>
		<updated>2026-01-25T02:26:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-------------------------------------------------------------------------------- -- This module provies helper functions for manipulating Lua functions. -- -- @module func -- @alias  p -- @author ExE Boss --------------------------------------------------------------------------------  require(&amp;quot;strict&amp;quot;); local checkTypeMulti = require(&amp;quot;libraryUtil&amp;quot;).checkTypeMulti;  local p = {};  -------------------------------------------------------------------------------- -- Creates...&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;
-- 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;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
require(&amp;quot;strict&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 length = select(&amp;quot;#&amp;quot;, ...);&lt;br /&gt;
	local args = {...};&lt;br /&gt;
&lt;br /&gt;
	return function(...)&lt;br /&gt;
		local callArgs = { unpack(args, 1, length) };&lt;br /&gt;
		local innerLength = select(&amp;quot;#&amp;quot;, ...);&lt;br /&gt;
		for i = 1, innerLength do&lt;br /&gt;
			callArgs[length + i] = select(i, ...);&lt;br /&gt;
		end&lt;br /&gt;
		return func(unpack(callArgs, 1, innerLength + length));&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p;&lt;/div&gt;</summary>
		<author><name>Lynn</name></author>
	</entry>
</feed>