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

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  func main() {
     8  	a := []func(string){bar}
     9  	b := a[0]
    10  	b("bar")
    11  }
    12  
    13  func bar(a string) {
    14  	fmt.Println(a)
    15  }
    16  
    17  // Output:
    18  // bar