Last active
August 29, 2015 14:10
-
-
Save RYO-mini/09c1b560c6d3c2d8f4cd to your computer and use it in GitHub Desktop.
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 sampleNest() -> Int { | |
var value = 0 | |
func numIncrement() { | |
value += 1 | |
} | |
func numDecrement() { | |
value -= 1 | |
} | |
numIncrement() | |
numIncrement() | |
numDecrement() | |
return value | |
} | |
println( sampleNest() ) | |
// 出力 | |
// 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment