function Functional.Take(L,W,f)f=f or 1 local w=W+(f-1)if w>#L then w=#L end local g={}for W=f,w,1 do local w=L[W]local y=W-(f-1)g[y]=w end return g end

function Functional.Take(list, count, startingIndex)
	startingIndex = startingIndex or 1

	local maxIndex = count + (startingIndex - 1)
	if maxIndex > #list then
		maxIndex = #list
	end

	local new = {}

	for i = startingIndex, maxIndex do
		local value = list[i]
		local newIndex = i - (startingIndex - 1)
		new[newIndex] = value
	end

	return new
end
