Remove an occurrence of item

var a = [1,2,3,1,2,3]
a.remove 2
assert a == [1,3,1,2,3]

Property definitions

core $ RemovableCollection :: remove
	# Remove an occurrence of `item`
	#
	#     var a = [1,2,3,1,2,3]
	#     a.remove 2
	#     assert a == [1,3,1,2,3]
	fun remove(item: nullable Object) is abstract
lib/core/collection/abstract_collection.nit:408,2--413,46

core $ ArrayMapKeys :: remove
	redef fun remove(key)
	do
		var i = self.map.index(key)
		if i >= 0 then self.map.remove_at_index(i)
	end
lib/core/collection/array.nit:814,2--818,4

core $ ArrayMapValues :: remove
	redef fun remove(item)
	do
		var map = self.map
		var i = map._items.length - 1
		while i >= 0 do
			if map._items[i].second == item then
				map.remove_at_index(i)
				return
			end
			i -= 1
		end
	end
lib/core/collection/array.nit:855,2--866,4

core $ HashMapKeys :: remove
	redef fun remove(key) do self.map.remove_node(key)
lib/core/collection/hash_collection.nit:301,2--51

core $ HashMapValues :: remove
	redef fun remove(item)
	do
		var map = self.map
		var c = map._first_item
		while c != null do
			if c._value == item then
				map.remove_node(c._key)
				return
			end
			c = c._next_item
		end
	end
lib/core/collection/hash_collection.nit:350,2--361,4

neo4j $ NeoNodeCollection :: remove
	redef fun remove(node) do
		for n in self do
			if node == n then
				remove_node(n)
				return
			end
		end
	end
lib/neo4j/graph/graph.nit:136,2--143,4

core $ ProxyQueue :: remove
	redef fun remove(e) do seq.remove(e)
lib/core/queue.nit:147,2--37

core $ RandQueue :: remove
	redef fun remove(e) do seq.remove(e)
lib/core/queue.nit:205,2--37

core $ ArraySet :: remove
	redef fun remove(item)
	do
		var i = _array.index_of(item)
		if i >= 0 then remove_at(i)
	end
lib/core/collection/array.nit:614,2--618,4

core $ List :: remove
	redef fun remove(e)
	do
		var node = search_node_after(e, _head)
		if node != null then remove_node(node)
	end
lib/core/collection/list.nit:176,2--180,4

dom $ XMLEntities :: remove
	redef fun remove(e) do
		if e isa XMLEntity then
			e.set_parent null
			entities.remove(e)
		end
	end
lib/dom/xml_entities.nit:88,2--93,4

dummy_array $ DummyArray :: remove
	redef fun remove(value)
	do
		assert not is_empty
		if not value isa Int then return
		var l = _length
		if l > 1 then
			var last = _values[l - 1]
			var pos = _keys[value]
			_keys[last] = pos
			_values[pos] = last
		end
		_length = l - 1
	end
lib/dummy_array/dummy_array.nit:31,2--43,4

core $ AbstractArray :: remove
	redef fun remove(item) do remove_at(index_of(item))
lib/core/collection/array.nit:269,2--52

core $ HashSet :: remove
	redef fun remove(item) do remove_node(item)
lib/core/collection/hash_collection.nit:459,2--44

gamnit $ SpriteSet :: remove
	redef fun remove(e)
	do
		super
		if e isa Sprite then unmap_sprite e
	end
lib/gamnit/flat/flat_core.nit:998,2--1002,4

pthreads $ ReverseBlockingQueue :: remove
	# When the Queue is empty, signal any possible waiting thread
	redef fun remove(e) do
		mutex.lock
		real_collection.remove(e)
		if real_collection.is_empty then cond.signal
		mutex.unlock
	end
lib/pthreads/concurrent_collections.nit:534,2--540,4