def concat element, index
      raise IndexError, 'Expected new unique index' if @index.include? index

      @index |= [index]
      @data[@index[index]] = element

      update_position_cache
    end
def concat element, index
      raise IndexError, 'Expected new unique index' if @index.include? index

      @index |= [index]
      @data[@index[index]] = element

      update_position_cache
    end
Append an element to the vector by specifying the element and index