3 ms·
Thank you - searching for the word with was unfruitful for me.
by swsieber 9y ago
Thank you - searching for the word with was unfruitful for me.
- pdpi 9y agoThis is a recurring theme with Kotlin: inline receiver functions with a lambda parameter are an amazingly versatile tool for building functions that implement what would be a language feature/syntactic sugar in other languages. `with` here is a good example, but `let` and `use` are other good examples of this in play (`use` gives you try-with-resource, let plays nicely with the ?. safe navigation operator to execute code on non-null objects `maybeNullObject?.let { doStuffWith(it) }`)