/// <summary>
        /// Removes an element at the given index.
        /// </summary>
        /// <param name = "index">The index of the element to remove.</param>
        public void RemoveAt(int index)
        {
            // Update pending operations to reflect the removed item.
            _pendingOperations.RemoveInterval(new Interval <int>(index, index));

            // Move all operations to the right of the removed index, one to the left.
            int last = _list.Count - 1;

            _pendingOperations.MoveInterval(new Interval <int>(index + 1, last), -1);

            // Actual remove.
            _list.RemoveAt(index);
        }