Yes, these functions should not be used anymore.

On the website, below the example, it states the reason.

Extension functions are just normal functions:

```
fun addTwoTimesTo(initial: Int, toAdd : Int) =
initial+toAdd+toAdd
fun subtractTwoTimesTo(initial : Int, minus: Int) =
initial - minus - minus
```

let’s test using oneLiner:

```
fun shouldGetSameValue(
initial : Int,
operation: Int
) = addTwoTimesTo(
subtractTwoTimes(initial, operation),
operation
)
```

I find this difficult to read. This function would way better if we could call it on `initial`

, doesn’t it?

Well, we can check this by using extension-functions. Oh and to to let it look even more like we are adding it to the Int-class, let’s reference to `initial`

using `this`

.

Then you will get:

```
fun Int.addTwoTimes(toAdd: Int) = this + toAdd + toAdd
fun Int.subtractTwoTimes(minus : Int) = this - minus - minus
```

Now we can rewrite the test:

```
fun shouldGetSameValue(
initial : Int,
operation: Int
) = initial.addTwoTimes(operation)
.subtractTwoTimes(operation)
```

We only changed the looks. It’s still the same as the first function.

Do note:

- Extension functions don’t care about inheritance. If you store a Child in a variabel of type Parent and have extension functions for both Child and Parent, the parent function will be called.
- a function actually declared on a class will always winn from an extension-function.
- as the function changes only the looks, you can’t suddenly get access to private functions/fields inside the class.