Last active
June 6, 2020 19:22
-
-
Save rydrman/a020fc15f8b00ad3b01228ae1bfbc653 to your computer and use it in GitHub Desktop.
Function example not existing as soon as possible
This file contains 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
func getValue() int { | |
value := 0 | |
if condition { | |
value = someBase() | |
if shouldMore { | |
value += more() | |
} | |
} else { | |
value = alternative() | |
} | |
return value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment