How can I shift the list as a loop? The input:
local connections = {1, 1, 0, 1}
Needed result:
local variants = {
{1, 1, 0, 1}, -- as original table
{1, 1, 1, 0}, -- shifted once to the right
{0, 1, 1, 1}, -- shifted twice
{1, 0, 1, 1}, -- shifted three times
}