A continuous function $f : U \subset \mathbb{R}^n \to \mathbb{R}^n$, is said to be locally injective at $x_0 \in U$ if exist a neighborhood $V \subset U$ of $x_0$ s.t. $f|_V$ is injective. $f$ is said to be locally injective on $U$ if is locally injective at all points of $U$.
If $n=1$, clearly $f$ is locally injective on $U$ iff it's injective on $U$. If $n >1$, this is false (at least is what I believe).
Does anybody know a counterexample i.e. a continuous function which is locally injective on an open $U$ set but it's not injective on $U$?
[observation] if $f$ is locally injective, by the invariance domain theorem is a local homeomorphism. if $f$ is also proper (i.e. the counter-image of a compact set is compact), then it's also a global homeomorphism (Caccioppoli theorem), and consequently injective. This means the counterexample cannot be a proper map.
[edit] I forgot to specify that I was interested in continuous functions.