The extremal function Ex(u, n) (introduced in the theory of DavenportSchinzel sequences in other notation) denotes for a fixed finite alternating sequence u = ababa . . . the maximum length of a finite sequence v over n symbols with no immediate repetition which does not contain u. Here (following the idea of J. Nešetřil) we generalize this concept for arbitrary sequence u. We summarize the alr...