rsplitSlice method
Divides array into two Slices at index from end. The first will contain all indices from [0, N - M) (excluding the index N - M itself) and the second will contain all indices from [N - M, N) (excluding the index N itself).
Implementation
(Slice<T>, Slice<T>) rsplitSlice(int index) {
assert(index >= 0 && index <= _list.length, "Index out of bounds");
return (
Slice(_list, 0, _list.length - index),
Slice(_list, _list.length - index, _list.length)
);
}