lambda_value.go 216 B

12345678910111213141516171819
  1. // lambda_value.go
  2. package main
  3. import (
  4. "fmt"
  5. )
  6. func main() {
  7. fv := func() {
  8. fmt.Println("Hello World!")
  9. }
  10. fv()
  11. fmt.Printf("The type of fv is %T", fv)
  12. }
  13. /* Output:
  14. Hello World!
  15. The type of fv is func()
  16. */