Skip to content

Instantly share code, notes, and snippets.

@e2kaneko
Created September 24, 2012 07:45
Show Gist options
  • Save e2kaneko/3774803 to your computer and use it in GitHub Desktop.
Save e2kaneko/3774803 to your computer and use it in GitHub Desktop.
GroovyのClosure(クロージャ)スコープ
a = "xxx"
c = {
a = it
b = it
println a
}
c("o_o")
println a
println b
/*
o_o
o_o
o_o
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment