Introduction
Extension functions let you add new actions to existing types without changing their code.
You want to add a new feature to a class from a library you can't change.
You want to make your code cleaner by adding helpful functions to common types.
You want to organize utility functions close to the types they work with.
You want to avoid subclassing just to add a small function.
You want to improve readability by calling functions directly on objects.