What happen to composite of infinite number of continuous functions? We all know that a composite of continuous functions is continuous. And this holds for any $\textbf{finite}$ number of functions. 
My question is what happen to infinite number of functions? Is it always discontinuous? Or it can also be continuous in some cases? Any counter examples and examples where it is discontinuous and continuous for infinite number of functions?
Many thanks!
 A: I assume that, as long as we restrict to compositions of a function with itself, by infinite composition you mean the function $f_\infty$ which associates to $x$ the value $\lim_{n \to \infty} f^{\circ n}(x)$ for $f$ your function of interest, defined on some domain. If so, Jason Knapp's comment gives a) an example of why this may not be defined and b) an infinite family of examples where it is defined and the resulting function is constant (and in particular continuous). As a different example of the second phenomenon, you could take $f(x) = x/2$, defined on the reals. Then $f_\infty(x) = 0$ for all $x$. You could also start with $f(x) = x$ to obtain $f_\infty(x) = x$.
Here's an example of a function where the resulting infinite composition is defined but discontinuous: define $f : \mathbb{R} \to \mathbb{R}$ by
$$f(x) = \begin{cases} 0, & \text{if $x \leq 1/2$ or $x \geq 3/2$}, \\ 1 - 2\lvert 1 -x \rvert,& \text{otherwise.} \end{cases}$$
Draw the graph of this function to see what it does. Clearly, $f_\infty(1) = 1$, but you can show that $f_\infty(x) = 0$ for $x \not= 1$. As you can see, the graph of this function has a spike at $x = 1$; intuitively, as you increase the number of compositions, this spike becomes thinner and thinner.
