func main(){
getSquareRoot := func(x float64) float64 {
return math.Sqrt(x)
}
fmt.Println(getSquareRoot(9))
}
go可以这么声明函数
最新推荐文章于 2023-03-02 20:59:34 发布
func main(){
getSquareRoot := func(x float64) float64 {
return math.Sqrt(x)
}
fmt.Println(getSquareRoot(9))
}