package main

import (
	"fmt"
	"slices"
)

func main() {
	// section: example
	original := []int{0, 1, 2, 4, 5}
	cloned := slices.Clone(original[1:4]) // <-- clone the subslice
	cloned[0] = 9
	cloned[1] = 8
	cloned[2] = 7
	fmt.Printf("original: %v\n", original)
	fmt.Printf("cloned  : %v\n", cloned)
	// section: example
}
