$ luarocks install luatableTable helpers for Lua: iterators, functional helpers, set operations and utilities.
`require "luatable"` returns its own module and leaves the global `table` alone
(`table.install()` copies the functions there on request). Wrappers give a plain table
these as methods plus operator overloads (+ - * .. ==), without putting a metatable on
the data. Works on Lua 5.1 - 5.4 and LuaJIT 2.1.
local table = require "luatable"
local t = table { 1, 2, 3, 4 }
print(t:accept(table.even):map(table.sqr):reduce(0, table.sum)) --> 20
Wrappers: table{...} / new, wrap, unwrap, iswrapper, ismethod, get, set, len, pairs, ipairs, strict, install
More: https://github.com/Luca96/lua-table
Versions
Dependencies
lua >= 5.1