In Rudin Real and Complex Analysis there is an exercise (6, Ch. 4) that asks to show that a countably infinite orthonormal set $\{u_n:n\in\mathbb{N}\}$ in a Hilbert space $H$ is closed and bounded but not compact.
That it is bounded and not compact is easy, but I really can't figure out why it is necessarily closed. If $\|u_{n_k}-x\|\to 0$ for some $x\in H$, why would $x\in\{u_n\}$?
If $u_{n_k}$ converges in $H$ it is in particular Cauchy. Hence, there exists $N\in\mathbb{N}$ such that $\|u_{n_{i}}-u_{n_{j}}\|<1$ for all $i,j\geq N$. But if $u_{n_i}\neq u_{n_j}$ we have $$\|u_{n_i}-u_{n_j}\|^2=\|u_{n_i}\|^2+\|u_{n_j}\|^2=2,$$ so the sequence is eventually constant. Hence its limit is in $\{u_n:n\in\mathbb{N}\}$.