From d7c66522cf365f516babcfeb1d4a2d36c3ea41af Mon Sep 17 00:00:00 2001 From: delta Date: Wed, 29 Oct 2025 16:35:38 +0100 Subject: a small refactor --- .config/awesome/quarrel/table.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.config/awesome/quarrel/table.lua') 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 -- cgit v1.2.3