With extension functions you can create a function...
# getting-started
m
With extension functions you can create a function that can be invoked on objects of certain type.
Copy code
fun SomeClass.doSomething() {
    // code here
}
It can be invoked with typical syntax
someObject.doSomething()
, but it has no access to class’s intrinsics as it is not a real member function.