doc / ch.tutteli.atrium.core / kotlin.Function0 / evalOnce

evalOnce

fun <T> (() -> T).evalOnce(): () -> T (source)
Deprecated: Will be removed with 0.17.0 without replacement

Caches the result of evaluating this function in case it gets called and does not call it a second time but returns the same result again.

Return
The result of evaluating this function (calling it).