localsearch=require('Exponential search')localwork=function(init,predicate,linkformat,listformat)localmax=search(predicate,init)locallinks={}fori=init,maxdolinks[i-init+1]=linkformat(i)endreturnlistformat(links)endlocallinkformats={}--attach all sorts of fun ways to format a linklocallistformats={}--attach all sorts of fun ways to format a list of formatted linkslocalp={}p.linkformats=linkformatsp.listformats=listformats--attach all sorts of fun helpersreturnp