Suppose $f\in L^2=L^2([0,1])$ (that is, $f$ is square-integrable). Let $f_n$ be an approximation of $f$ by steps of differences of $\int f$. Formally, $$f_n = \sum_{i=1}^n\mathbf{1}_{((i-1)/n,i/n]}\left(n\int_{(i-1)/n}^{i/n}f(t)dt\right)$$
Explanation: I have divided $[0,1]$ into $n$ equal parts, and let $f_n$ be constant on each part, with height equal to $\int f$'s difference on the edges of that part, divided by its length. In fact, it looks like there's nothing special about dividing into $n$ equal parts - as long as the maximal part's length tends to 0 with $n$, it should probably be all right.
My question is this: does it follow that $f_n$ converges to $f$ in $L^2$?