Remove the item at index and shift all following elements

var a = [10,20,30]
a.remove_at(1)
assert a  == [10,30]

REQUIRE index >= 0 and index < length

Property definitions

core $ Sequence :: remove_at
	# Remove the item at `index` and shift all following elements
	#
	#     var a = [10,20,30]
	#     a.remove_at(1)
	#     assert a  == [10,30]
	#
	# REQUIRE `index >= 0 and index < length`
	fun remove_at(index: Int) is abstract
lib/core/collection/abstract_collection.nit:1230,2--1237,38

core $ List :: remove_at
	redef fun remove_at(i)
	do
		var node = get_node(i)
		if node != null then remove_node(node)
	end
lib/core/collection/list.nit:182,2--186,4

more_collections $ UnrolledList :: remove_at
	redef fun remove_at(index)
	do
		var node = node_at(index)
		index = index_within_node + node.head_index

		# Shift left all the elements after `index`
		for i in [index+1 .. node.tail_index[ do
			node.items[i-1] = node.items[i]
		end
		node.tail_index -= 1
		node.items[node.tail_index] = null

		length -= 1

		var next_node = node.next
		var prev_node = node.prev
		if node.is_empty and (next_node != null or prev_node != null) then
			# Empty and non-head or tail node, delete
			if next_node != null then
				next_node.prev = node.prev
			else tail_node = prev_node.as(not null)

			if prev_node != null then
				prev_node.next = node.next
			else head_node = next_node.as(not null)
		end
	end
lib/more_collections/more_collections.nit:574,2--600,4

dom $ XMLEntities :: remove_at
	redef fun remove_at(ind) do
		var el = entities[ind]
		entities.remove_at(ind)
		el.set_parent null
	end
lib/dom/xml_entities.nit:123,2--127,4

core $ AbstractArray :: remove_at
	redef fun remove_at(i)
	do
		var l = length
		if i >= 0 and i < l then
			var j = i + 1
			while j < l do
				self[j-1] = self[j]
				j += 1
			end
			_length = l - 1
		end
	end
lib/core/collection/array.nit:280,2--291,4

pthreads $ ConcurrentSequence :: remove_at
	redef fun remove_at(index)
	do
		mutex.lock
		real_collection.remove_at(index)
		mutex.unlock
	end
lib/pthreads/concurrent_collections.nit:355,2--360,4

pthreads :: redef_collections $ Array :: remove_at
	redef fun remove_at(index)
	do
		mutex.lock
		super
		mutex.unlock
	end
lib/pthreads/redef_collections.nit:62,2--67,4