# "composition" of "pointwise convergent sequences of functions"

Intuitively, if $f_n\to f$ as $n\to\infty$ and $g^{(n)}_i\to f_n$ as $i\to\infty$, can we get $g_j\to f$ as $j\to\infty$?
Formally,

Let $\{f_n\}_n$ be a sequence of functions from $\mathbb{R}^d$ to $\overline{\mathbb{R}}$, the extended real line. Let $f$ be its pointwise limit, i.e. for each $x\in\mathbb{R}^d$ and each $\varepsilon>0$, there exists $N\in\mathbb{Z}^+$ such that $|f_n(x)-f(x)|<\varepsilon$ for all $n\geq N$. Each $f_n$ is the pointwise limit of sequence $\{g^{(n)}_i\}_i$. Can we construct a sequence of $g$'s converging pointwise to $f$? If not, what additional conditions do we need?

As usual, any help is appreciated:)

So in a topological space $$(X,\tau)$$, we assume that around $$x\in X$$ we a have a countable basis of neighbourhoods and we take a converging sequence $$x_n\to x$$ and a sequence of converging sequences $$y_m^n\to x_n$$ for all $$n\in\mathbb{N}$$.
Now for any open neighbourhood $$U$$ of $$x$$ we have that there exists $$N_U\in\mathbb{N}$$ such that $$x_n\in U\quad\forall n>N_U.$$ Since $$U$$ is open we get a natural number $$M^n_U$$ for all $$n>N_U$$ such that $$y^n_m\in U\quad\forall m>M^n_U.$$
So now by taking $$U_k$$ a basis for the neighbourhoods of $$x$$, for any $$k\in\mathbb{N}$$ we can just take any $$y^n_m\in U_k\quad m>M^n_{U_k},\, n>N_{U_k},$$ and get the desired sequence convergin to $$x$$.
Given the set of functions $$\mathrm{Set}(\mathbb{R}^d,\overline{\mathbb{R}})$$, the pointwise convergence is the finest topology that makes all the evaluations continuous, and thus you can apply the above to the topological space $$\mathrm{Set}(\mathbb{R}^d,\overline{\mathbb{R}})$$.