github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/run4.gno (about)

     1  package main
     2  
     3  type fn func(int)
     4  
     5  func f1(i int) { println("f1", i) }
     6  
     7  func test(f fn, v int) { f(v) }
     8  
     9  func main() { test(f1, 21) }
    10  
    11  // Output:
    12  // f1 21