]> git.madduck.net Git - etc/awesome.git/blobdiff - helpers.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

widget.temp: reset path to /sys/devices; closes #441
[etc/awesome.git] / helpers.lua
index 4d75f7b6067f7eb9d5430eeac9e5cedbd785e06c..d6f6b3c1fcf861c283fff9134a1b9587a40998cd 100644 (file)
@@ -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 = {{}}