Last active
October 21, 2017 13:32
-
-
Save igorwojda/2b5f4621cf55a23a7aa7f7fb1f2d4e9a to your computer and use it in GitHub Desktop.
Side effects - mutate argument
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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