If $f:\mathbb{R}\to\mathbb{Q}$ is continuous, then it is constant. Are there infinite connected $T\_2$-spaces $X,Y$ such that the only continuous maps $f:X\to Y$ are the constant maps?



Connected $T_2$-spaces with only constant maps between them
Any real-valued function on the positive integers with the prime integer topology (subbasis of sets of the form $U\_p(b)=\{b+np:n\in \mathbb{Z}, p\nmid b\}$) is constant. This is on [page 82](https://books.google.com/books?id=Gc3DAgAAQBAJ&pg=PA82) of [Counterexamples in Topology](https://en.wikipedia.org/wiki/Counterexamples_in_Topology); item 4 shows that this topology is $T\_2$ and item $7$ both constancy of real-valued functions and connectedness.


