function Table.take(n,M)local h={}for M=1,math.min(#n,M),1 do h[M]=n[M]end return h end local function n(n,M)error(("\066\097\100 \105\110\100\101\120 \037\113"):format(tostring(M)),2)end local M={__index=n,__newindex=n}

function Table.take(source, count)
	local newTable = {}
	for i=1, math.min(#source, count) do
		newTable[i] = source[i]
	end
	return newTable
end

local function errorOnIndex(_, index)
	error(("Bad index %q"):format(tostring(index)), 2)
end

local READ_ONLY_METATABLE = {
	__index = errorOnIndex;
	__newindex = errorOnIndex;
}
