vararg is a Lua library for manipulation of vararg expressions.
These functions basically allow you to do things with vararg that
cannot be efficiently done in pure Lua but can be easily done through the C API.
You can install it from source using LuaRocks:
luarocks make etc/vararg-scm-1.rockspecvararg.concatandvararg.mapnow work with functions that yield.
-
Lua 5.3 compatibility.
-
Performance improvement in 'vararg.pack'.
-
Removal of limitation of max 255 values to pack using 'vararg.pack'.
-
Function
vararg.appendrequires a value to be appended. -
Function
vararg.rangeand vararg packs (vararg.pack) does not fill the resulting range withnilvalues.Therefore
vararg.range(2, 4, 1,2,3)will return2,3instead of2,3,nil.Likewise,
vararg.pack(1,2,3)(2, 4)will return2,3instead of2,3,nil. -
Function
vararg.removedoes not raise out of bound errors. -
Function
vararg.concatnow only takes a single function which results are appended to the additional arguments. -
New function
vararg.len. -
Reference manual.
-
No more a pure Lua alternative implementation.
- New operation
vararg.map.
- First release.