local function p(p,d,T)local J=type(p)assert(J=="\116\097\098\108\101","\101\120\112\101\099\116\101\100 \097 \116\097\098\108\101 \102\111\114 \102\105\114\115\116 \097\114\103\117\109\101\110\116\044 \103\111\116 "..J)local C=#p d=d or 1 T=T or C assert(d<=T,"\115\116\097\114\116 \105\110\100\101\120 \109\117\115\116 \098\101 \108\101\115\115 \116\104\097\110 \111\114 \101\113\117\097\108 \116\111 \101\110\100 \105\110\100\101\120")local O={}local s=1 for d=math.max(1,d),math.min(T,C),1 do O[s]=p[d]s=s+1 end return O end return p

local function slice(list, from, to)
	local listType = type(list)
	assert(listType == "table", "expected a table for first argument, got " .. listType)
	
	local len = #list
	from = from or 1
	to = to or len

	assert(from <= to, "start index must be less than or equal to end index")

	local new = {}
	local index = 1

	for i = math.max(1, from), math.min(to, len) do
		new[index] = list[i]
		index = index + 1
	end

	return new
end

return slice