From 721fc8e900769b8d1d4207d1ef30ef5d5208cf7f Mon Sep 17 00:00:00 2001 From: Fabien Fleutot Date: Wed, 13 Feb 2008 00:05:42 +0100 Subject: [PATCH] fixed iall and iany in table2 --- src/lib/table2.lua | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/lib/table2.lua b/src/lib/table2.lua index 7383cbc..f5ea84f 100644 --- a/src/lib/table2.lua +++ b/src/lib/table2.lua @@ -103,24 +103,16 @@ function table.isub (t, ...) return u end ---[[ function table.iall (f, ...) local result = true local function g(...) return not f(...) end - table.iforeach(g, ...) - return result + return not table.iforeach(g, ...) + --return result end function table.iany (f, ...) local function g(...) return not f(...) end - return table.iall(g, ...) -end -]] - -function table.inverse (t) - local i = { } - for a, b in pairs(t) do i[b]=a end - return i + return not table.iall(g, ...) end function table.shallow_copy(x) -- 2.44.0