Question: what is extension function in kotlin?
Answer: Extensions. Kotlin provides the ability to extend a class with new functionality without having to inherit from the class or use design patterns such as Decorator. ... Such functions are available for calling in the usual way as if they were methods of the original class. This mechanism is called extension functions.