package main

import (
	"fmt"
	"slices"
)

func main() {
	// section: example
	pattern := []string{"Go", "is", "fun"}

	// Repeat the pattern 3 times
	repeated := slices.Repeat(pattern, 3)

	fmt.Println("pattern:", pattern)
	fmt.Println("repeated:", repeated)

	// Useful for creating initialized slices
	zeros := slices.Repeat([]int{0}, 5)
	fmt.Println("zeros:", zeros)

	// Or creating separator patterns
	separator := slices.Repeat([]string{"-"}, 3)
	fmt.Println("separator:", separator)
	// section: example
}
