Enumerable¶
Enumerable is a parent structure that contains a set of suffixes common to few structures in kOS. As a user of kOS you will never handle pure instances of this structure,
but rather concrete types like List, Range, Queue etc.
Structure¶
-
structure
Enumerable¶ Members¶ Suffix Type Description ITERATORIteratorfor iterating over the elements REVERSEITERATORIteratorfor iterating over the elements in the reverse order LENGTHscalar number of elements in the enumerable CONTAINS(item)Boolean check if enumerable contains an item EMPTYBoolean check if enumerable is empty DUMPstring verbose dump of all contained elements
-
Enumerable:
ITERATOR¶ Type: IteratorAccess: Get only An alternate means of iterating over an enumerable. See:
Iterator.
-
Enumerable:
REVERSEITERATOR¶ Type: IteratorAccess: Get only An alternate means of iterating over an enumerable. Order of items is reversed. See:
Iterator.
-
Enumerable:
CONTAINS(item)¶ Parameters: - item – element whose presence in the enumerable should be checked
Returns: Returns true if the enumerable contains an item equal to the one passed as an argument