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

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