Describe a function in two parts: the part that varies goes in a separate class.
Here is a class diagram from the GOF: