Jump to content

Module:User:Martijn Hoekstra/Sandbox/Archiving

From Wikipedia, the free encyclopedia
local search = require('Exponential search')

local work = function(init, predicate, linkformat, listformat)
	local max = search(predicate, init)
	local links = {}
	for i=init, max do
      links[i - init + 1] = linkformat(i)
    end
    return listformat(links)
end

local linkformats = {}
--attach all sorts of fun ways to format a link

local listformats = {}
--attach all sorts of fun ways to format a list of formatted links

local p = {}
p.linkformats = linkformats
p.listformats = listformats
--attach all sorts of fun helpers

return p