copy()
for sliding elements SCC-S1018copy()
permits using the same source and destination slice, even with
overlapping ranges. This makes it ideal for sliding elements in a slice.
for i := 0; i < n; i++ {
x[i] = x[offset+i]
}
copy(x[:n], x[offset:])