local function Q(Q,z,Y)local J=Y for Y=1,#Q,1 do J=z(J,Q[Y],Y)end return J end return Q
--[[
	Performs a left-fold of the list with the given initial value and callback.
]]
local function foldLeft(list, callback, initialValue)
	local accum = initialValue

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

	return accum
end

return foldLeft
