TITLE: fixed-point iteration
QUESTION [6 upvotes]: Are there functions $f$ of one real variable $x\in X$ that are not contracting maps on the set $X$ but for which, given the starting point $x_0$, the fixed-point iteration $x_n=f(x_{n-1})$, for $n=1,2,3,\dots$ will still converge to a fixed-point?

REPLY [8 votes]: Consider the function $f=\chi_{\mathbb Q}$ (i.e., $f(x)=1$ if $x$ is rational and $0$ otherwise). It is nowhere continuous, let alone contracting. 
On the other hand, $f(f(x))=1$ for all $x$.