function Functional.Fold(W,y,d)local r=y for y=1,#W,1 do r=d(r,W[y],y)end return r end

function Functional.Fold(list, initial, callback)
	local accum = initial

	for key = 1, #list do
		accum = callback(accum, list[key], key)
	end

	return accum
end
