Is it possible for function $f : \mathbb{R} \to \mathbb{R}$ have a maximum at every point in a countable dense subset of its domain ? The motivation for this question is I have a sequence of functions $\{f_n\}$ where the number of maxima increases with $n$ and I am interested to know what happens to the sequence of functions.
PS : every function of the sequence has a finite number of maxima.
EDIT : $f$ should not be constant function.