A finite collection of element values, such as a sequence or a set.
interface collection[combivariant value element]
subtypes composite value
The number of elements in the collection.
nonnegative size readonly
Specifies whether the collection has zero elements.
boolean is empty readonly
Specifies whether the collection has more than zero elements. Shortcut for !is_empty.
boolean is not empty readonly
Enumerates elements in some collection-defined order. This method returns a snapshot of the collection state, so subsequent mutations of the collection do not cause changes in the returned list.
immutable list[element] elements readonly
Check whether the collection has at least one element that satisfies the predicate.
not yet implemented boolean has(predicate[element] the predicate) pure
not yet implemented nonnegative count(predicate[element] the predicate) pure
not yet implemented readonly collection[element] filter(predicate[element] the predicate) pure
not yet implemented readonly list[element] order by(order[element] the order) pure
not yet implemented immutable collection[element] filter(predicate[element] the predicate) immutable pure
not yet implemented void remove(predicate[element] the predicate)
void clear() writeonly