Look at the next element but does not remove it

var a = (new Array[Int]).as_lifo
a.add 1
assert a.peek == 1
a.add 2
assert a.peek == 2
assert a.take == 2
assert a.peek == 1

Property definitions

core $ Queue :: peek
	# Look at the next element but does not remove it
	#
	# ~~~
	# var a = (new Array[Int]).as_lifo
	# a.add 1
	# assert a.peek == 1
	# a.add 2
	# assert a.peek == 2
	# assert a.take == 2
	# assert a.peek == 1
	# ~~~
	fun peek: E is abstract
lib/core/queue.nit:61,2--72,24

core $ RandQueue :: peek
	redef fun peek do
		if peek_cached then return peek_cache
		var res = seq.rand
		peek_cache = res
		peek_cached = true
		return res
	end
lib/core/queue.nit:193,2--199,4

core $ MinHeap :: peek
	redef fun peek do return items.first
lib/core/queue.nit:243,2--37

core $ LifoQueue :: peek
	redef fun peek do return seq.last
lib/core/queue.nit:154,2--34

core $ FifoQueue :: peek
	redef fun peek do return seq.first
lib/core/queue.nit:160,2--35