$$f(x) = \begin{cases} x & \text{if }x\in \mathbb Q \\\ x+1 & \text{if }x\in \mathbb R\setminus\mathbb Q \end{cases} $$
Or even $$ g(x) = \begin{cases} -x & \text{if }x\in\mathbb Q \\\ 2\sqrt2-x & \text{if }x-\sqrt2 \in \mathbb Q \\\ x & \text{otherwise} \end{cases} $$ which is _its own inverse_ and nowhere continuous.