Created
June 4, 2014 10:43
-
-
Save aya-eiya/cbfeb6b782dfa4ecd120 to your computer and use it in GitHub Desktop.
Groovyのちょっとしたこと「try{return func1()}finally{return func2()}の挙動」 ref: http://qiita.com/aya_eiya/items/95cd1b20cd36d8e43b88
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
def func = { | |
try{ | |
return {print('a');0}() | |
}finally{ | |
return {print('b');1}() | |
} | |
} | |
println func() // ab1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment