code with a specific purpose, which can be used in a number of use cases