"Gabriel" == Gabriel Bertilson <arboreous.philologist@gmail.com> writes:
Gabriel> Then the closure receives an unused first argument and a
Gabriel> second argument i, and it returns the i-plus-one-th argument
Gabriel> to the original function (similar to the behavior of the
Gabriel> function returned by ipairs). Not sure if this is more or less
Gabriel> efficient memory-wise than using a table.
I don't see any obvious reason why it would be more efficient - creating
the closure is allocating an object, after all, and it seems that
closures with upvalues probably would be more overhead than tables. But
I've not tried it.