Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module:Sandbox/Ahecht/expand

From Wikipedia, the free encyclopedia
local function expand(frame, template)
	return frame:expandTemplate{title=template, args=frame.args}
end
	
return setmetatable({}, {__index =												-- returns an empty TABLE whose metatable has the __index set so that, for any given KEY, it returns
	function(_, template)														-- this anonymous function called as function(TABLE, KEY)
		return function (frame) return expand (frame, template) end;			-- which in turn returns a function that calls expand() with the KEY name
	end
})