package main import ( "fmt" "math" ) func main(){ /* declare a function variable */ getSquareRoot := func(x float64) float64 { return math.Sqrt(x) } /* use the function */ fmt.Println(getSquareRoot(9)) }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more