Hi All, i'm still learning Kotlin and i'm currently learning how to use scope functions and would like to understand what the following mean for points 1 and 2
inline fun <T, R> T.let(*block*: (T) -> R): R
1) <T, R> T what does the extra T outside the <> mean
There are many concepts packed in the same function here, so it's normal to be a bit confused.
<T,R>
and the following
T
are 2 separate parts of the function definition.
• The part between <> declares the type parameters of the function (because the function is generic).
• The following