If you know C#, you might be familiar with extension functions. Extension functions allow you to add new functionality to the existing class without inheriting it.
Extension functions
Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.