Find an example of a function f with domain R that is continuous nowhere, but where |f| is continuous on all of R.
A counter-example is given by f(x) = x*sin(1/x).