#Go言語 `make`で新たなsliceを定義して、`copy`で複製する。 ```go func main() { xs := []int{1, 3, 2, 5, 4} xsc := make([]int, len(xs)) copy(xsc, xs) sort.Slice(xs, func(i, j int) bool { return xs[i] < xs[j] }) fmt.Println(xs) fmt.Println(xsc) } ``` - [Go Playground](https://go.dev/play/p/ZV7KTIGrbVa)