+ # The index of the first occurrence of `item`.
+ # Return -1 if `item` is not found.
+ # Comparison is done with `==`.
+ #
+ # var a = [10,20,30,10,20,30]
+ # assert a.index_of(20) == 1
+ # assert a.index_of(40) == -1
+ fun index_of(item: E): Int do return index_of_from(item, 0)
+
+ # The index of the last occurrence of `item`.
+ # Return -1 if `item` is not found.
+ # Comparison is done with `==`.
+ #
+ # var a = [10,20,30,10,20,30]
+ # assert a.last_index_of(20) == 4
+ # assert a.last_index_of(40) == -1
+ fun last_index_of(item: E): Int do return last_index_of_from(item, length-1)
+
+ # The index of the first occurrence of `item`, starting from pos.
+ # Return -1 if `item` is not found.
+ # Comparison is done with `==`.
+ #
+ # var a = [10,20,30,10,20,30]
+ # assert a.index_of_from(20, 3) == 4
+ # assert a.index_of_from(20, 4) == 4
+ # assert a.index_of_from(20, 5) == -1
+ fun index_of_from(item: E, pos: Int): Int