github.com/gmemcc/yaegi@v0.12.1-0.20221128122509-aa99124c5d16/_test/len0.go (about)

     1  package main
     2  
     3  func f(a []int) interface{} {
     4  	return len(a)
     5  }
     6  
     7  func main() {
     8  	a := []int{1, 2}
     9  	println(f(a).(int))
    10  }
    11  
    12  // Output:
    13  // 2