I$\DeclareMathOperator\map{map}$I have the following question:
Let $X$ and $Y$ be topological spaces. Let $map(X,Y)$$\map(X,Y)$ denote the space of non-costantconstant continuous functions from $X$ to $Y$. Suppose moreover that each continuous function from $X$ to $Y$ is homotopical equivalenthomotopic to a fixed continuous function $f \colon X \to Y$. In case $f$ is a homeomorphism, is it correct to saytrue that $map(X,Y)$$\map(X,Y)$ is contractible?
I am grateful if anyone has any counter-examplescounterexamples or what conditions must be imposed on $X$ and $Y$ for the question to be true?