github.com/gmemcc/yaegi@v0.12.1-0.20221128122509-aa99124c5d16/_test/run4.go (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