Set the first item.

Is equivalent with self[0] = item.

var a = [1,2,3]
a.first = 10
assert a == [10,2,3]

Property definitions

core $ Sequence :: first=
	# Set the first item.
	# Is equivalent with `self[0] = item`.
	#
	#     var a = [1,2,3]
	#     a.first = 10
	#     assert a == [10,2,3]
	fun first=(item: E)
	do self[0] = item end
lib/core/collection/abstract_collection.nit:1078,2--1085,22

core $ List :: first=
	# O(1)
	redef fun first=(e) do _head.as(not null).item = e
lib/core/collection/list.nit:31,2--32,51

pthreads $ ConcurrentSequence :: first=
	redef fun first=(e)
	do
		mutex.lock
		real_collection.first = e
		mutex.unlock
	end
lib/pthreads/concurrent_collections.nit:305,2--310,4