Example of non-continuous composition for the compact-open topology in non-LCH case? For topological spaces $X,Y$ let $[X,Y]$ denote the space of continuous maps $X\rightarrow Y$, equipped with the compact-open topology.
According to the Wikipedia page for the compact-open topology,
when $Y$ is locally-compact Hausdorff,
then the composition map
$$
[Y,Z] \times [X,Y] \xrightarrow{ (g,f) \mapsto g \circ f } [X,Z]
$$
is continuous. (Here the LHS has the product topology.)
I was wondering, does anyone have a counter-example showing the above map need not be continuous when $Y$ is not locally-compact Hausdorff?
 A: In any cartesian closed category, the internal hom $[X,Y]$ admits a composition map. Indeed, if $U$ is a generic object then
$$
\begin{align}
\text{Hom}(U, [X,Y] \times [Y,Z]) 
&\cong \text{Hom}(U, [X,Y]) \times \text{Hom}(U, [Y,Z]) \\
&\cong \text{Hom}(U \times X, Y) \times \text{Hom}(U \times Y, Z) \\
&\overset{\star}{\to} \text{Hom}(U \times X, Z) \\
&\cong \text{Hom}(U, [X,Z])
\end{align}
$$
Where $\star$ is the map taking $f : U \times X \to Y$ and $g : U \times Y \to Z$ and outputting the map
$(u,x) \mapsto g(u,f(u,x)) : U \times X \to Z$
Now, by yoneda, this map must come from a map $[X,Y] \times [Y,Z] \to [X,Z]$.
So to show that $[X,Y]$ equipped with the compact open topology has a composition rule, it suffices to show that it's part of a cartesian closed structure when we restrict to some nice subcategory of $\mathsf{Top}$. But you can find this as a corollary of theorem 4.4 in Booth and Tillotson's Monoidal Closed, Cartesian Closed, and Convenient Categories of Topological Spaces, available here, for instance.

As for your counterexample when $Y$ is not locally compact hausdorff, in the cartesian closed case, the standard example is $[\mathbb{Q}, \mathbb{R}]$.
Here the evaluation map $\mathbb{Q} \times [\mathbb{Q},\mathbb{R}] \to \mathbb{R}$ is discontinuous, as is shown in Internal Hom Objects in the Category of Topological Spaces by Michael Hallam (avaailble here).
Since $X \cong [1, X]$ (notice $1$ is locally compact hausdorff), this shows the natural map (which you can check is the map constructed in the first half of this answer)
$$[1,\mathbb{Q}] \times [\mathbb{Q}, \mathbb{R}] \to [1, \mathbb{R}]$$
is not continuous.

I hope this helps ^_^
A: Here is a more pedestrian answer which does not employ the notion of cartesian closed category.
Let $Y$ be any non locally compact metric space.  Therefore there exists a point $y_0$ in $Y$ admiting an open
neighborhood $U$, such that no relatively compact neighborhood of $y_0$ is contained in $U$.
Let $X$ be the topological space containing a single point $*$, namely $X=\{*\}$, and let $Z={\mathbb R}$.
We then claim that the composition operation
$$
  [Y,{\mathbb R}]\times [X,Y]\to [X,{\mathbb R}],
  $$
is discontinuous at the point $(g,f)$, where $g$ is the identically zero function on $Y$, and $f$ is the function taking $*$
to $y_0$.
To prove it, suppose otherwise, that is, that the composition operation is continuous at $(g,f)$.
Consider the neighborhood $\Omega $ of $g\circ f$,  in the compact open topology, defined in terms of the compact set $K=\{*\}$ in $X$,
and the
open set $(-1, 1)\subseteq {\mathbb R}$, namely
$$
  \Omega =\{h\in [X, Y]: h(K)\subseteq (-1, 1)\}.
  $$
To put it bluntly, $h\in \Omega $ iff $|h(*)|<1$.
By our assumption that the composition is continuous, there are neighborhoods $A\ni f$, and $B\ni g$, such that, for
any $(g',f')\in A\times B$, one has that $g'\circ f'\in \Omega $.
By the definition of the compact-open topology of $[Y,{\mathbb R}]$, where $g$ lies, there are compact set $K_1,K_2,\ldots ,K_n\subseteq Y$, and
open sets $U_1,U_2,\ldots ,U_n\subseteq {\mathbb R}$, such that
$$
  g\in  A_0:= \{g'\in  [Y, {\mathbb R}]: g'(K_i)\subseteq U_i, \text{ for all } i\} \subseteq A.
  $$
Since $g\in  A_0$, we see that $0\in U_i$, for every $i$.
A similar analysis provides a basic neighborhood $B_0\ni f$, contained in $B$, but since $X$ is such a simple space, $B_0$
necessarily has the form
$$
  B_0=\{f'\in  [X, Y]: f'(*)\in  V\},
  $$
where $V$ is some open set,  necessarily containing  $y_0$.
By our assumption, $U\cap V$ is not relatively compact, and hence evidently
$$
  U\cap V\not\subseteq \bigcup _{i=1}^nK_i.
  $$
We may therefore pick some $y_1\in U\cap V$ which is not in any $K_i$.  Letting $f'$  be the function taking $*$ to
$y_1$, it is then clear that $f'\in B_0\subseteq B$.
Furthermore, let $g'\in [Y, {\mathbb R}]$, be given by
$$
  g'(y)=c\cdot \text{dist}\Big (y,\bigcup _{i=1}^nK_i\Big ),
  $$
where $c$ is a large constant, yet to be determined.
Since $g'$ vanishes on each $K_i$, it is clear that
$g'(K_i)\subseteq U_i$, for every $i$, that is, $g'\in A_0\subseteq A$.  By assumption, $g'\circ f'\in  \Omega $, that is
$$
  |(g'\circ f')(*)|<1.
  $$
However notice that
$$
  (g'\circ f')(*) = g'(y_1) = c\cdot \text{dist}\Big (y_1,\bigcup _{i=1}^nK_i\Big ),
  $$
which is nonzero because $y_1$ is not in $\bigcup _{i=1}^nK_i$, and which can be made as big as we want upon a
suitable choice of $c$.  In particular, choosing $c = \text{dist}\Big (y_1,\bigcup _{i=1}^nK_i\Big )^{-1}$, we have that
$$
  |(g'\circ f')(*)| = 1 \not < 1,
  $$
so   $g'\circ f'\notin \Omega $, a contradiction.
