Jan
@PublishedApi internal var onFinish = {} inline fun onFinish(action: () -> Unit) { onFinish = action }
Sam
The inline modifier affects both the function itself and the lambdas passed to it: all of those will be inlined into the call site.
inline
https://kotlinlang.org/docs/inline-functions.html
ephemient
noinline
inline fun onFinish(crossinline action: () -> Unit) { onFinish = { action() } }
A modern programming language that makes developers happier.