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 linklocal listformats = {} --attach all sorts of fun ways to format a list of formatted linkslocal p = {} p.linkformats = linkformats p.listformats = listformats --attach all sorts of fun helpersreturn p |