Jump to content

Module:OutputBuffer

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jackmcbarn (talk | contribs) at 23:45, 25 June 2014 (Created page with 'return function() local buffer = {} return function(text) buffer[#buffer + 1] = text end, function(sep) return table.concat(buffer, sep) end end'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

return function()
	local buffer = {}
	return function(text)
		buffer[#buffer + 1] = text
	end,
	function(sep)
		return table.concat(buffer, sep)
	end
end