This is from Rudin - "Real and Complex Analysis" p.166, 3rd ed.:
Let $X=Y=[0,1],\mu=\lambda =\text{ Lebesgue measure on }[0,1]$. Choose $\{\delta_n\}$ so that $0=\delta_1<\delta_2<...<\delta_n \rightarrow 1$ and let $g_n$ be a real continuous function with support in $(\delta_n,\delta_{n+1})$ such that $\int_0^1g_n(t)\,\mathrm{d}t=1$ for all $n\in\mathbb{N}$. Define
$\displaystyle f(x,y)=\sum_{n=1}^\infty \left [ g_n(x)-g_{n+1}(x)\right ] g_n(y)$.
The Rudin states that
$\displaystyle\int_0^1\mathrm{d}x\int_0^1f(x,y)\,\mathrm{d}y=1\ne 0=\int_0^1\mathrm{d}y\int_0^1f(x,y)\,\mathrm{d}x$
which I cannot reproduce. For the left side I get
$\sum_{n=1}^\infty\int_0^1 \left [ g_n(x)-g_{n+1}(x)\right ] \int_0^1 g_n(y)\,\mathrm{d}y\mathrm{d}x= \sum_{n=1}^\infty\int_0^1\left [ g_n(x)-g_{n+1}(x)\right ]\,\mathrm{d}x=0$
I have no idea what I am missing.
$$\int_0^1 f(x,y)\,dy=\sum_{n=1}^\infty(g_n(x)-g_{n+1}(x))\int_0^1 g_n(y)\,dy=\sum_{n=1}^\infty(g_n(x)-g_{n+1}(x))=g_1(x).$$ $$\int_0^1\left(\int_0^1 f(x,y)\,dy\right)\,dx =\int_0^1 g_1(x)\,dx=1.$$