I would like to daisy chain my companion object functions. Example:
Company.addUser("bob").deleteUser("steve")
class Company {
companion object {
fun addUser(name: String): Company {
// add user code goes here
return Company
}
fun deleteUser(name: String): Company {
// add code to delete user
return Company
}
}
}
This of course will not compile. How can I return the companion object from the functions so that I can daisy them in a call?