drop
drop<
T>(iterable,count):IterableIterator<T>
Defined in: packages/core/src/iterable/drop.ts:15
Yields everything after the first count elements.
What Array.prototype.slice(count) does for an array, without materialising.
An input shorter than count yields nothing.
Time complexity: O(n) — the skipped elements are still pulled from the source, because an iterable offers no way to seek past them.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”Iterable<T>
The input iterable.
number
How many elements to skip. Must be a non-negative integer.
Returns
Section titled “Returns”IterableIterator<T>
An iterator over the remaining elements.
Throws
Section titled “Throws”If count is not a non-negative integer.