X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/92d17d289c64eb8416a881e4fe0113a64b534003..bd636ca4184bb83db3db02a2ee34d8cf80f22c24:/helpers.lua?ds=sidebyside diff --git a/helpers.lua b/helpers.lua index 4d75f7b..d6f6b3c 100644 --- a/helpers.lua +++ b/helpers.lua @@ -12,7 +12,8 @@ local io = { lines = io.lines, open = io.open } local pairs = pairs local rawget = rawget -local table = { sort = table.sort } +local table = { sort = table.sort, unpack = table.unpack } +local unpack = unpack or table.unpack -- lua 5.1 retro-compatibility -- Lain helper functions for internal use -- lain.helpers @@ -186,7 +187,7 @@ function helpers.trivial_partition_set(set) return ss end --- creates the powerset of a given set +-- create the powerset of a given set function helpers.powerset(s) if not s then return {} end local t = {{}}