# If fτf\tau is continuous for every path τ\tau in XX, is f:X→Yf:X\rightarrow Y continuous?

Let $X$ be a path connected space and $Y$ be a topological space. Let $f:X\rightarrow Y$ be a function such that for every path $\tau:\mathbb{I}\rightarrow X$ , $f\tau:\mathbb{I}\rightarrow Y$ is continuous.

Does it follow that $f$ is continuous ?

Thank you

where $L_n = \left\{(x,nx) : \frac{1}{n^2} \leqslant x \leqslant \frac{1}{n}\right\}$, with the subspace topology induced by $\mathbb{R}^2$. Let $f \colon X \to \mathbb{R}$ be given by
Then $f$ is not continuous in $(0,0)$, since $f\left(\frac{1}{n^2},\frac{1}{n}\right) = 2$ for all $n \geqslant 1$, but $f$ is continuous in all other points. Since every path passing through $(0,0)$ in $Y$ must lie on the segment $\{0\}\times [0,1]$ in a neighbourhood of all $t$ with $\tau(t) = (0,0)$, $f\circ \tau$ is continuous for all paths.
However, as Ted Shifrin notes in a comment, if $X$ is locally path-connected and first countable, then the continuity of $f\circ\tau$ for all paths $\tau \colon \mathbb{I} \to X$ implies the continuity of $f$.