标签:style blog io color ar java sp div on
Functions are values too.
在函数式语言中中函数都是变量,比如在javascript中
package main import ( "fmt" "math" ) func main() { hypot := func(x,y float64) float64 { return math.Sqrt(x*x + y*y) } fmt.Println(hypot(3, 4)) }
标签:style blog io color ar java sp div on
原文地址:http://www.cnblogs.com/ghgyj/p/4055518.html