# another product.
# This module define several collection classes.
-package collection
+module collection
-import abstract_collection
import range
import list
-intrude import array # FIXME because of string.nit
+import array
import sorter
import hash_collection
+import union_find
+
+redef class Sequence[E]
+
+ # Copy the content of `self` between `start` and `len` to a new Array.
+ fun subarray(start, len: Int): Array[E]
+ do
+ var a = new Array[E].with_capacity(len)
+ for i in [start .. start+len[ do a.add(self[i])
+ return a
+ end
+end