diff options
Diffstat (limited to '.config/awesome/quarrel/table.lua')
| -rw-r--r-- | .config/awesome/quarrel/table.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/awesome/quarrel/table.lua b/.config/awesome/quarrel/table.lua index 2ae15ee..49ed45e 100644 --- a/.config/awesome/quarrel/table.lua +++ b/.config/awesome/quarrel/table.lua @@ -35,6 +35,14 @@ function qtable.filter(t, f, dict) return nt end +--- Get a slice of a table +---@param t table +---@param i integer start of the slice +---@param j integer end of the slice (inclusive) +function qtable.slice(t, i, j) + return { table.unpack(t, i, j) } +end + -- This is taken from http://lua-users.org/wiki/SortedIteration -- This version is stripped of comments and empty lines + some stuff is renamed |
