concept lazy in category functional programming

This is an excerpt from Manning's book Functional Programming with Kotlin.
The notion of non-strict or lazy evaluation comes to the rescue here—the value is only computed at the point where it is actually referenced, not where it is declared. We are no longer greedy in performing all the calculations, but instead compute them on demand.
This language feature is implemented in Kotlin by way of a builtin function called
lazy. An instance ofLazy<T>(withTbeing the type of the value to be assigned) is returned when this function is invoked with a lambda thunk as argument. ThisLazyobject serves as delegate for implementing a lazy property. Delegation is expressed by using thebykeyword.val x: Int by lazy { expensiveOp() } #1 fun useit() = if (x > 10) "hi" #2 else if (x == 0) "zero" #3 else ("lo")The lazy property
xis initialized on first access by executingexpensiveOpinside the lambda thunk that was passed into thelazyfunction. The result is then cached inside the delegate object for subsequent evaluations to take advantage of.