|
I disagree. The numeric for loop is a second class citizen: you can't pass it to (or return it from) a function (which sadly is still not being done very often in the Lua code I've seen -- the recently released lua-fun being a notable exception). Whenever you pass a table as input to a function, consider passing an iterator triplet instead. This way you can use the function for `pairs()`, `ipairs()`, `filter(p ,pairs())`, map(f, ipairs())`, and possibly other data sources. At some point in the future I'd like to see a merge of iterators and LTN12 sources and sinks.