摘要: 最近codereview看到闭包,得学习下 https://studygolang.com/articles/5057 匿名函数:没有函数名的函数 闭包:外部函数定义的内部函数。 闭包给访问外部函数定义的内部变量创造了条件。也将关于函数的一切封闭到了函数内部,减少了全局变量,这也是闭包的真实含义。 阅读全文
posted @ 2018-01-14 01:58 sunshinelym 阅读(119) 评论(0) 推荐(0) 编辑