Skip to content

Instantly share code, notes, and snippets.

@igorwojda
Last active October 21, 2017 13:32
Show Gist options
  • Save igorwojda/2b5f4621cf55a23a7aa7f7fb1f2d4e9a to your computer and use it in GitHub Desktop.
Save igorwojda/2b5f4621cf55a23a7aa7f7fb1f2d4e9a to your computer and use it in GitHub Desktop.
Side effects - mutate argument
fun increatePatientAge(patient:Patient): Patient {
patient.age = patient.age++
return patient
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment