--[[Module that returns one value from a list of unnamed parametersNamed parameter idx is the index of the parameter that is to be returnedNegative indices count backward from the end of the list==]]localp={}p.getVal=function(frame)localargs={}-- copy arguments from frame object and its parentfork,vinpairs(frame.args)doargs[k]=vendfork,vinpairs(frame:getParent().args)doargs[k]=vendifnotargs[1]thenreturnnilendlocalidx=tonumber(args.idx)or1ifidx<0thenidx=#args+idx+1endreturnargs[idx]endreturnp