Revision as of 15:33, 14 May 2025 by wikt>Theknightwho(Protected "Module:table/invert": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)))
localpairs=pairs--[==[Invert a table. For example, {invert({ "a", "b", "c" })} -> { { a = 1, b = 2, c = 3 }}]==]returnfunction(t)localmap={}fork,vinpairs(t)domap[v]=kendreturnmapend