Merge pull request #162 from zouyx/master

增加注释使代码更易懂
This commit is contained in:
无闻
2015-10-28 01:36:49 -04:00

View File

@@ -32,7 +32,7 @@ func main() {
}
func f() {
for i := 0; i < 4; i++ {
g := func(i int) { fmt.Printf("%d ", i) }
g := func(i int) { fmt.Printf("%d ", i) } //此例子中只是为了演示匿名函数可分配不同的内存地址,在现实开发中,不应该把该部分信息放置到循环中。
g(i)
fmt.Printf(" - g is of type %T and has value %v\n", g, g)
}