Remove all items

var a = [1,2,3]
a.clear
assert a.length == 0

ENSURE is_empty

Property definitions

core $ RemovableCollection :: clear
	# Remove all items
	#
	#     var a = [1,2,3]
	#     a.clear
	#     assert a.length == 0
	#
	# ENSURE `is_empty`
	fun clear is abstract
lib/core/collection/abstract_collection.nit:399,2--406,22

core $ ArrayMapKeys :: clear
	redef fun clear do self.map.clear
lib/core/collection/array.nit:813,2--34

core $ ArrayMapValues :: clear
	redef fun clear do self.map.clear
lib/core/collection/array.nit:853,2--34

core $ HashMapKeys :: clear
	redef fun clear do self.map.clear
lib/core/collection/hash_collection.nit:299,2--34

core $ HashMapValues :: clear
	redef fun clear do self.map.clear
lib/core/collection/hash_collection.nit:348,2--34

neo4j $ NeoNodeCollection :: clear
	redef fun clear do
		for node in self do remove_node(node)
	end
lib/neo4j/graph/graph.nit:132,2--134,4

core $ MinHeap :: clear
	redef fun clear do items.clear
lib/core/queue.nit:241,2--31

neo4j $ SequentialNodeCollection :: clear
	redef fun clear do
		nodes.clear
		length = 0
	end
lib/neo4j/graph/sequential_id.nit:102,2--105,4

core $ ArraySet :: clear
	redef fun clear do _array.clear
lib/core/collection/array.nit:622,2--32

core $ List :: clear
	redef fun clear
	do
		_head = null
		_tail = null
		length = 0
	end
lib/core/collection/list.nit:188,2--193,4

core $ CircularArray :: clear
	redef fun clear do
		length = 0
		head = 0
		tail = -1
	end
lib/core/collection/circular_array.nit:240,2--244,4

more_collections $ UnrolledList :: clear
	redef fun clear
	do
		head_node = new UnrolledNode[E](nodes_length)
		tail_node = head_node
		length = 0
	end
lib/more_collections/more_collections.nit:375,2--380,4

dummy_array $ DummyArray :: clear
	redef fun clear
	do
		_length = 0
	end
lib/dummy_array/dummy_array.nit:67,2--70,4

core $ AbstractArray :: clear
	redef fun clear do _length = 0
lib/core/collection/array.nit:267,2--31

core $ HashSet :: clear
	redef fun clear do raz
lib/core/collection/hash_collection.nit:461,2--23

gamnit $ SpriteSet :: clear
	redef fun clear
	do
		for sprite in self do
			sprite.context = null
			sprite.sprite_set = null
		end
		super
		for c in contexts_items do c.destroy
		contexts_map.clear
		contexts_items.clear
		sprites_to_remap.clear
	end
lib/gamnit/flat/flat_core.nit:1010,2--1021,4

core $ Bytes :: clear
	redef fun clear do length = 0
lib/core/bytes.nit:568,2--30

pthreads $ ConcurrentArray :: clear
	redef fun clear
	do
		mutex.lock
		real_collection.clear
		mutex.unlock
	end
lib/pthreads/concurrent_collections.nit:396,2--401,4