```fun sendContacts(contacts: Set<Contact>) ...
# announcements
f
Copy code
fun 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