Prove that $\mathbb{N}^{\mathbb{N}} \equiv_c \mathbb{R}$
$\textbf{My Attempt:}$
Let \begin{equation*} \mathbb{N}^{\mathbb{N}}=\{f: \text{all functions} \mid f: \mathbb{N} \to \mathbb{N} \} \end{equation*} Let \begin{equation*} g:= f \to f(\mathbb{N}) \end{equation*} In this mappings $f \in \mathbb{N}^{\mathbb{N}}$ is mapped to its image represented in decimal form. For example, if $f$ is a constant function such that $f(x)=c \hspace{2mm} \forall x \in \mathbb{N}$ then $g(f)=0.cccccccc \dots$.
Similarly, if $f$ is the identity function then $g(f)=0.123456\dots$.
Such a mapping $g$ is clearly bijective.
Let \begin{equation*} h := f(\mathbb{N}) \to \mathbb{R} \end{equation*} Such that \begin{equation*} h\left (0.x_1x_2x_3\dots \right)=[x_1;x_2,x_3,x_4, \dots] \end{equation*} Thus $h$ is a mapping from the decimal expansion to the continued fraction representation of some $x \in \mathbb{R}$.
Note that $h$ is onto because every element $x \in \mathbb{R}$ can be represented as a continued fraction.Also, $h$ is one-to-one because the unique decimal representation is mapped to a unique continued fraction by definition. Then $f \circ g$ is bijective. \begin{equation*} \mathbb{N}^{\mathbb{N}} \equiv_c \mathbb{R} \end{equation*}
I noticed that all my decimal representations will be infinite. However, rational numbers have finite continued fraction expansions. Is there any way I could tweak my proof to account for this?