Prove the following version of Morera’s theorem. If \(f:\mathbb {D}\to \mathbb {C}\) is a continuous function such that for every rectangle \(R\subset \mathbb {D}\)
\[ \int _{\partial R} f(z)\,dz=0 \]
then \(f\) is holomorphic. Note: It does not follow from the assumption in any obvious way that integrals over triangles are 0.