localf={}-- Řadafunctionf.for_nowiki(frame)localindex=tonumber(frame.args.lowest)orf.lowestNonEmpty(frame)-- co když to vrátí string?localmax=tonumber(frame.args.highest)orf.highestNonEmpty(frame)-- co když to vrátí string?localtemplate=mw.text.unstripNoWiki(frame.args[2])localresult={}whileindex<=maxdolocaltemp=string.gsub(template,'{{{i}}}','{{{'..index..'}}}')table.insert(result,temp)index=index+1endreturnframe:getParent():preprocess(table.concat(result,frame.args[1]))end-- Poslední neprázdnýfunctionf.highestNonEmpty(frame)localt={}forkey,valueinpairs(frame:getParent().args)doifvalue~=''thenlocaliiftype(key)=='string'theni=tonumber(string.match(key,'[0-9]*$'),10)elsei=keyendifi~=nilthent[i]=keyendendendreturnt[table.maxn(t)]end-- První neprázdnýfunctionf.lowestNonEmpty(frame)localargs=frame:getParent().argslocallength=0for_inpairs(args)dolength=length+1endlocalt={}forkey,valueinpairs(args)doifvalue~=''thenlocaliiftype(key)=='string'theni=tonumber(string.match(key,'[0-9]*$'),10)elsei=keyendifi~=nilthent[length-i]=keyendendendreturnt[table.maxn(t)]end-- Poslední prázdný nebo neprázdnýfunctionf.highest(frame)localt={}forkeyinpairs(frame:getParent().args)dolocaliiftype(key)=='string'theni=tonumber(string.match(key,'[0-9]*$'),10)elsei=keyendifi~=nilthent[i]=keyendendreturnt[table.maxn(t)]end-- První prázdný nebo neprázdnýfunctionf.lowest(frame)localargs=frame:getParent().argslocallength=0for_inpairs(args)dolength=length+1endlocalt={}forkeyinpairs(args)dolocaliiftype(key)=='string'theni=tonumber(string.match(key,'[0-9]*$'),10)elsei=keyendifi~=nilthent[length-i]=keyendendreturnt[table.maxn(t)]endreturnf