Many of our data definitions and function definitions look alike. Similarly, a function that looks for a specific symbol in a list of symbols is nearly indistinguishable from one that looks for a specific number in a list of numbers.
Repetitions are the source of many programming mistakes.
Therefore good programmers try to avoid repetitions as much as possible. As we develop a set functions, especially functions derived from the same template, we soon learn to spot similarities. It is then time to revise the functions so as to eliminate the repetitions as much as possible. Put differently, a set of functions is just like an essay or a memo or a novel or some other piece of writing. The first draft is just a draft.