August 2018
Beginner
178 pages
4h 56m
English
If your function accepts more than one function type parameter, and you don't want to inline all parameters, you can place the noinline keyword in front of the ones you don't want inlined. As the next example shows, the first function argument will be inlined and the second will not be:
inline fun noInlineExample(first: () -> String, noinline second: () -> String) { //omitted}
Read now
Unlock full access