concept substitution model in category kotlin

This is an excerpt from Manning's book Functional Programming with Kotlin.
Conversely, the substitution model is simple to reason about since effects of evaluation are purely local (they affect only the expression being evaluated) and we need not mentally simulate sequences of state updates to understand a block of code. Understanding requires only local reasoning. We need not mentally track all the state changes that may occur before or after our function’s execution to understand what our function will do; we simply look at the function’s definition and substitute the arguments into its body. Even if you haven’t used the name “substitution model,” you have certainly used this mode of reasoning when thinking about your code.
Listing 7.15. Using the substitution model to simplify both sides of an equation
val x = 1 val y = unit(x) val f = { a: Int -> a + 1 } val id = { a: Int -> a } map(unit(x), f) == unit(f(x)) #1 map(unit(x), id) == unit(id(x)) #2 map(unit(x), id) == unit(x) #3 map(y, id) == y #4

This is an excerpt from Manning's book The Joy of Kotlin.
In the rest of this chapter, I briefly present concepts like immutability, referential transparency, and the substitution model, as well as other suggestions, which together you can use to make your programs much safer. You’ll apply these concepts over and over in the upcoming chapters.