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(, ))
}
2023-07-29 22:59:58
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(, ))
}