https://kotlinlang.org logo
t

tipsy

01/28/2017, 12:04 AM
what would be the best way to go about creating an update-function with all optional parameters?
Copy code
fun update(id: Int, name: String, email: String) {
    updatedUser = findUserById(id).copy( ... only copy params which have been provided )
}