July 2018
Intermediate to advanced
242 pages
8h 6m
English
We could also use another version of the joinToString() function to simplify the logic of our generateRecipientsString() function implementation:
fun generateRecipientsString(recipients: List<Address?>): String = recipients.filterNotNull() .joinToString(", ", "To: ", "<br/>") { it.emailAddress }
As you can see, it takes the additional argument in the form of an inlined lambda block, which acts as a transformation function that is being applied to each of the recipients collection elements.
Read now
Unlock full access