Continuous images of Cauchy sequences are not necessarily Cauchy

Could you please provide an example for two metric spaces $X,Y$, a continuous function $f$ that maps $X$ to $Y$ and a Cauchy sequence in $X$, which is not mapped to a Cauchy sequence in $Y$ by $f$?

Does $f(x) = \frac{1}{x}$ work if $X$ is any metric space and $Y$ is the set of real numbers?


$X=(0,1),Y=\mathbb{R},f(x)={1\over x}, {1\over n}$ is cauchy in $X$ but $f({1\over n})=n$ which is not cauchy in $\mathbb{R}$