Some definitions first. Let $A \subseteq \mathbb R^n$. Let $x,y \in A$. A path between $x$ and $y$ is a continuous function $f: [0,1] \rightarrow \mathbb{R}^n$ with $f(0) = x$ and $f(1) = y$. The set $A$ is path-connected when for every $x, y \in A$, there exists a $C^1$ path between $x$ and $y$.
Let $f: A \rightarrow \mathbb{R}^m$ be a function, with $A \subseteq \mathbb{R}^n$. Suppose that $f'(a) = 0$ for all $a \in A$. Now if $A$ is path-connected, then $f$ is constant.
In a proof I saw of this theorem the property that every path between two points is $C^1$ is used. My question is: is this necessary? If so, I'd like to see a counterexample. In other words, I'm looking for a function $f: A \rightarrow \mathbb{R}^m$ with zero derivative everywhere, $A$ such that there is a path between any two points (but the path is not necessarily $C^1$) and $f$ is NOT constant.