fabricio
04/07/2018, 2:20 PMfun sendContacts(contacts: Set<Contact>) {
val contactsIds = contacts.map(Contact::getId).toSet()
if (contactsIds.isEmpty()) {
return
}
send(contactsIds)
}
is there any way to write that isEmpty() / return
in a single line in kotlin? or in a simpler/prettier way that doesn't require this traditional structure