github.com/traefik/yaegi@v0.15.1/_test/assign7.go (about)

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