function map(list, f) local tbl2, n, i = {}, #list, 1 for i=1, n do tbl2[i] = f(list[i]) end return tbl2 end
A nice little map function (for lists) for you to copy or include :-)
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment