摘要: func(){}() //加上小括号就是匿名函数 e.g: func(){ fmt.Println("这是一个匿名函数") }() func(a,b int){ fmt.Println(a,b) }(1,2) //定义一个带参数的匿名函数 func(a,b int)int{ return a+b } 阅读全文
posted @ 2021-12-06 17:03 冰镇李子园 阅读(49) 评论(0) 推荐(0)