Sequences are variable-length collections of elements:
Sequences是可变长度的元素集合:
1 | module M |
A sequence can be empty — that is, it can contain no elements, or it can hold any number of elements up to the memory limits of your platform.
Sequences can contain elements that are themselves sequences. This arrangement allows you to create lists of lists:
sequence可以是空的,即不包含任何元素,也可以包含任意数量的元素,但不得超过平台的内存限制。
sequence可以包含本身就是sequence的元素。通过这种安排,您可以创建列表的列表:
1 | module M |
Sequences are used to model a variety of collections, such as vectors, lists, queues, sets, bags, or trees. (It is up to the application to decide whether or not order is important; by discarding order, a sequence serves as a set or bag.)
Sequences用于对各种集合建模,例如向量、列表、队列、集合、包或树。 (由应用程序决定顺序是否重要;通过丢弃顺序,Sequences充当集合或包。)