Remove the last item.

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

REQUIRE not is_empty

Property definitions

core $ Sequence :: pop
	# Remove the last item.
	#
	#     var a = [1,2,3]
	#     assert a.pop  == 3
	#     assert a.pop  == 2
	#     assert a == [1]
	#
	# REQUIRE `not is_empty`
	fun pop: E is abstract
lib/core/collection/abstract_collection.nit:1129,2--1137,23

core $ List :: pop
	# O(1)
	redef fun pop
	do
		var node = _tail.as(not null)
		_tail = node.prev
		node.prev = null
		if _tail == null then
			_head = null
		else
			_tail.as(not null).next = null
		end
		length -= 1
		return node.item
	end
lib/core/collection/list.nit:146,2--159,4

core $ CircularArray :: pop
	redef fun pop do
		var l = length - 1
		assert l >= 0
		length = l

		var native = _native
		var t = tail
		var res = native[t]

		t -= 1
		if t < 0 then t += native.length
		tail = t

		return res
	end
lib/core/collection/circular_array.nit:119,2--133,4

more_collections $ UnrolledList :: pop
	redef fun pop
	do
		assert not_empty

		var node = tail_node
		while node.length == 0 do
			# Delete empty node
			var nullable_node = node.prev
			assert is_not_empty: nullable_node != null
			node = nullable_node
			node.next = null
			self.tail_node = node
		end

		var item = node.items[node.tail_index-1]
		node.tail_index -= 1
		length -= 1
		return item
	end
lib/more_collections/more_collections.nit:482,2--500,4

dom $ XMLEntities :: pop
	redef fun pop do
		var e = entities.pop
		e.set_parent null
		return e
	end
lib/dom/xml_entities.nit:101,2--105,4

core $ AbstractArray :: pop
	redef fun pop
	do
		assert not_empty: not is_empty
		var r = last
		_length -= 1
		return r
	end
lib/core/collection/array.nit:218,2--224,4

pthreads $ ConcurrentSequence :: pop
	redef fun pop
	do
		mutex.lock
		var r = real_collection.pop
		mutex.unlock
		return r
	end
lib/pthreads/concurrent_collections.nit:333,2--339,4

core $ Bytes :: pop
	#     var b = new Bytes.empty
	#     b.append([0x41, 0x41, 0x18])
	#     b.pop
	#     assert b.to_s == "AA"
	redef fun pop do
		assert length >= 1
		length -= 1
		return items[length]
	end
lib/core/bytes.nit:558,2--566,4

pthreads $ ConcurrentList :: pop
	redef fun pop
	do
		mutex.lock
		var r = real_collection.pop
		mutex.unlock
		return r
	end
lib/pthreads/concurrent_collections.nit:481,2--487,4