LazyIterator
- class LazyIterator[T]
-
Children
Members defined in
LazyIterator(7 members) Methods
- __bool__() bool
Returns
Trueif this range is not empty.
- __getitem__(arg0: int, /) syside.T
Get value at index, This is computed lazily. Throws
IndexErroron out of bounds.Notes:
Has complexity O(n) so should be used sparingly.
Only positive indices are allowed since size is unknown.
- at(arg0: int, /) syside.T | None
Get value at index. This is computed lazily. Returns
Nonefor out of bounds index.Notes:
Has complexity O(n) so should be used sparingly.
Only positive indices are allowed since size is unknown.
- collect() list[syside.T]
Collect all items into a
list.
- count() int
Count the number of items in this range. This is computed lazily.
- empty() bool
Check if this range is empty.
- for_each(arg0: Callable[[syside.T], None | bool | syside.VisitAction], /) None
Lazily visit each item in this range. Visitation is stopped on returning
FalseorVisitAction.Stop;