---@brief [[ ---Do not edit this file, it was generated! ---Provides a function to rotate a lua vararg ---@brief ]] local tbl = require('plenary.tbl') local rotate_lookup = {} {% for n in range(0, amount) %} rotate_lookup[{{n}}] = function ({% for n in range(n) %} A{{n}} {{ ", " if not loop.last else "" }} {% endfor %}) return {% for n in range(1, n) %} A{{n}}, {% endfor %} A0 end {% endfor %} local function rotate_n(first, ...) local args = tbl.pack(...) args[#args+1] = first return tbl.unpack(args) end local function rotate(nargs, ...) return (rotate_lookup[nargs] or rotate_n)(...) end return rotate