To remove the intermediate element, the remaining elements needed for a whole move, append or the same copy can be done in situ:
- a = []int{1, 2, 3, ...}
- a = append (a [: i], a [+ 1:] ...) // delete an intermediate element
- a = append (a [: i], a [i + N:] ...) // delete the middle N elements
- a = a [: i + copy (a [i:], a [i + 1:])] // delete an intermediate element
- a = a [: i + copy (a [i:], a [i + N:])] // delete the middle N elements