Let $f\colon(X,d_X)\rightarrow(Y,d_Y)$ be a function between metric spaces such that for every convergent sequence $(x_n)_{n\in\mathbb{N}}$ in $X$ the sequence $(f(x_n))_{n\in\mathbb{N}}$ is convergent in $Y$. Does this impy continuity of $f$?
At first I thought that this does not imply the continuity of $f$, so I tried to think of a counterexample. I thought about it for a long time, but I couldn't find one. I found a few similar problems, but none helped me. Can someone help me please?