github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/fun26.gno (about) 1 package main 2 3 type F func() (int, error) 4 5 func f1() (int, error) { return 3, nil } 6 7 func f2(a string, f F) { 8 c, _ := f() 9 println(a, c) 10 } 11 12 func main() { 13 f2("hello", F(f1)) 14 } 15 16 // Output: 17 // hello 3