Collection¶
No import is needed.
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
Collection¶
Sized collection — the type users pass into APIs that need a count. for (let x in xs) works for concrete @iterator types and for interface-typed Collection / IndexedCollection / Iterator (via .iterator() / .next() dispatch). Query chains start with seq() in system.collections, keeping bootstrap independent of List.
length¶
Number of elements currently stored.
is_empty¶
True when the collection has no elements.
all¶
True when every element satisfies pred.
any¶
True when at least one element satisfies pred.
none¶
True when no element satisfies pred.
count¶
Counts elements for which pred is true.
find¶
First element for which pred is true, or None.
for_each¶
Invokes action for each element in iteration order.