# Lipschitz continuous function whose derivative is not continuous almost everywhere

I want to disprove the following statement.

Every Lipschitz-Continuous function is almost everywhere continuous differentiable.

From Whitney-Extension theorem, we know that the derivative of a Lipschitz-continuous function is continuous on a set being arbitrary close to a co-nullset. Does there exist a counter-example for the statement on a co-null set? (Everything on the space with lebesgue measure)

My idea is to consider a nowhere continuous function $g(x)$ on a non-lebesgue null set, which is bounded $|g(x)|\leq M$ . Then, setting $$f(y)=\int_0^yg(x)dx$$, the function $f(x)$ is Lipschitz continuous. Using Rademacher-theorem, the derivative of $f$ is g. However, it is not obvious to me if such $g(x)$ exists and how does it looks like.

I would let $g$ be the characteristic function of a fat Cantor set. Then $f'=1$ at almost every point of that set, but is not continuous at any such point because the set has empty interior; there are points with $f'=0$ arbitrarily close nearby.