github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/variadic2.gno (about) 1 package main 2 3 import "fmt" 4 5 func f(a ...int) { 6 if len(a) > 2 { 7 fmt.Println(a[2]) 8 } 9 } 10 11 func main() { 12 f(1, 2, 3, 4) 13 } 14 15 // Output: 16 // 3