lastIndicesWhereAsync
lastIndicesWhereAsync<
T>(iterable,predicate,signal?):AsyncIterableIterator<number>
Defined in: packages/core/src/iterable/async/indices-where.ts:45
Yields the zero-based index of every element satisfying predicate, scanning
from the end.
The async counterpart of lastIndicesWhere. An async source has no end to
start from, so the whole of it is materialised first and held in memory.
Time complexity: O(n). Memory: O(n).
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”The input iterable, sync or async.
predicate
Section titled “predicate”MaybeAsyncPredicate<[T, number]>
Receives each element and its zero-based index.
signal?
Section titled “signal?”AbortSignal
Aborts the materialisation.
Returns
Section titled “Returns”AsyncIterableIterator<number>
An iterator over the matching indices, descending.