return function(O,Z)return function(p,j)if p==nil then p=O end local N=Z[j.type]if N then return N(p,j)end return p end end
return function(initialState, handlers)
	return function(state, action)
		if state == nil then
			state = initialState
		end

		local handler = handlers[action.type]

		if handler then
			return handler(state, action)
		end

		return state
	end
end
