diff options
| author | delta <darkussdelta@gmail.com> | 2025-10-29 16:35:38 +0100 |
|---|---|---|
| committer | delta <darkussdelta@gmail.com> | 2025-10-29 16:35:38 +0100 |
| commit | d7c66522cf365f516babcfeb1d4a2d36c3ea41af (patch) | |
| tree | 30c7d6103037b31170ae6d8fd58e3849e3cea823 /.config/awesome/quarrel/table.lua | |
| parent | df418700b7d776f03ee5b58daa2d497cddb45aca (diff) | |
a small refactor
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 |
