<A>(isEquivalent: (self: A, that: A) => boolean): (
self: Iterable<A>
) => Iterable<NonEmptyArray<A>>
<A>(
self: Iterable<A>,
isEquivalent: (self: A, that: A) => boolean
): Iterable<NonEmptyArray<A>>Groups equal, consecutive elements of an Iterable into NonEmptyArrays using the provided isEquivalent function.
Example (Grouping consecutive elements with custom equivalence)
import { Iterable } from "effect"
// Group consecutive equal numbers
const numbers = [1, 1, 2, 2, 2, 3, 1, 1]
const grouped = Iterable.groupWith(numbers, (a, b) => a === b)
console.log(Array.from(grouped))
// [[1, 1], [2, 2, 2], [3], [1, 1]]
// Case-insensitive grouping of strings
const words = ["Apple", "APPLE", "banana", "Banana", "cherry"]
const caseInsensitive = (a: string, b: string) =>
a.toLowerCase() === b.toLowerCase()
const groupedWords = Iterable.groupWith(words, caseInsensitive)
console.log(Array.from(groupedWords))
// [["Apple", "APPLE"], ["banana", "Banana"], ["cherry"]]
// Group by approximate equality
const floats = [1.1, 1.12, 1.9, 2.01, 2.05, 3.5]
const approxEqual = (a: number, b: number) => Math.abs(a - b) < 0.2
const groupedFloats = Iterable.groupWith(floats, approxEqual)
console.log(Array.from(groupedFloats))
// [[1.1, 1.12], [1.9, 2.01, 2.05], [3.5]]
// Only groups consecutive elements
const scattered = [1, 2, 1, 2, 1]
const scatteredGroups = Iterable.groupWith(scattered, (a, b) => a === b)
console.log(Array.from(scatteredGroups))
// [[1], [2], [1], [2], [1]] (no grouping since none are consecutive)grouping
Source effect/Iterable.ts:122439 lines
export const const groupWith: {
<A>(
isEquivalent: (self: A, that: A) => boolean
): (
self: Iterable<A>
) => Iterable<NonEmptyArray<A>>
<A>(
self: Iterable<A>,
isEquivalent: (self: A, that: A) => boolean
): Iterable<NonEmptyArray<A>>
}
Groups equal, consecutive elements of an Iterable into NonEmptyArrays using the provided isEquivalent function.
Example (Grouping consecutive elements with custom equivalence)
import { Iterable } from "effect"
// Group consecutive equal numbers
const numbers = [1, 1, 2, 2, 2, 3, 1, 1]
const grouped = Iterable.groupWith(numbers, (a, b) => a === b)
console.log(Array.from(grouped))
// [[1, 1], [2, 2, 2], [3], [1, 1]]
// Case-insensitive grouping of strings
const words = ["Apple", "APPLE", "banana", "Banana", "cherry"]
const caseInsensitive = (a: string, b: string) =>
a.toLowerCase() === b.toLowerCase()
const groupedWords = Iterable.groupWith(words, caseInsensitive)
console.log(Array.from(groupedWords))
// [["Apple", "APPLE"], ["banana", "Banana"], ["cherry"]]
// Group by approximate equality
const floats = [1.1, 1.12, 1.9, 2.01, 2.05, 3.5]
const approxEqual = (a: number, b: number) => Math.abs(a - b) < 0.2
const groupedFloats = Iterable.groupWith(floats, approxEqual)
console.log(Array.from(groupedFloats))
// [[1.1, 1.12], [1.9, 2.01, 2.05], [3.5]]
// Only groups consecutive elements
const scattered = [1, 2, 1, 2, 1]
const scatteredGroups = Iterable.groupWith(scattered, (a, b) => a === b)
console.log(Array.from(scatteredGroups))
// [[1], [2], [1], [2], [1]] (no grouping since none are consecutive)
groupWith: {
<function (type parameter) A in <A>(isEquivalent: (self: A, that: A) => boolean): (self: Iterable<A>) => Iterable<NonEmptyArray<A>>A>(isEquivalent: (self: A, that: A) => booleanisEquivalent: (self: Aself: function (type parameter) A in <A>(isEquivalent: (self: A, that: A) => boolean): (self: Iterable<A>) => Iterable<NonEmptyArray<A>>A, that: Athat: function (type parameter) A in <A>(isEquivalent: (self: A, that: A) => boolean): (self: Iterable<A>) => Iterable<NonEmptyArray<A>>A) => boolean): (self: Iterable<A>self: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A>(isEquivalent: (self: A, that: A) => boolean): (self: Iterable<A>) => Iterable<NonEmptyArray<A>>A>) => interface Iterable<T, TReturn = any, TNext = any>Iterable<import NonEmptyArrayNonEmptyArray<function (type parameter) A in <A>(isEquivalent: (self: A, that: A) => boolean): (self: Iterable<A>) => Iterable<NonEmptyArray<A>>A>>
<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A>(self: Iterable<A>self: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A>, isEquivalent: (self: A, that: A) => booleanisEquivalent: (self: Aself: function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A, that: Athat: function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A) => boolean): interface Iterable<T, TReturn = any, TNext = any>Iterable<import NonEmptyArrayNonEmptyArray<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A>>
} = import dualdual(
2,
<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A>(self: Iterable<A>self: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A>, isEquivalent: (self: A, that: A) => booleanisEquivalent: (self: Aself: function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A, that: Athat: function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A) => boolean): interface Iterable<T, TReturn = any, TNext = any>Iterable<import NonEmptyArrayNonEmptyArray<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A>> => ({
[var Symbol: SymbolConstructorSymbol.SymbolConstructor.iterator: typeof Symbol.iteratorA method that returns the default iterator for an object. Called by the semantics of the
for-of statement.
iterator]() {
const const iterator: Iterator<A, any, any>iterator = self: Iterable<A>self[var Symbol: SymbolConstructorSymbol.SymbolConstructor.iterator: typeof Symbol.iteratorA method that returns the default iterator for an object. Called by the semantics of the
for-of statement.
iterator]()
let let nextResult:
| IteratorResult<A, any>
| undefined
nextResult: type IteratorResult<T, TReturn = any> =
| IteratorYieldResult<T>
| IteratorReturnResult<TReturn>
IteratorResult<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A> | undefined
return {
Iterator<NonEmptyArray<A>, any, any>.next(...[value]: [] | [any]): IteratorResult<NonEmptyArray<A>, any>next() {
let let result: IteratorResult<A, any>result: type IteratorResult<T, TReturn = any> =
| IteratorYieldResult<T>
| IteratorReturnResult<TReturn>
IteratorResult<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A>
if (let nextResult:
| IteratorResult<A, any>
| undefined
nextResult !== var undefinedundefined) {
if (let nextResult: IteratorResult<A, any>nextResult.done?: boolean | undefineddone) {
return { IteratorReturnResult<TReturn>.done: truedone: true, IteratorReturnResult<any>.value: anyvalue: var undefinedundefined }
}
let result: IteratorResult<A, any>result = let nextResult: IteratorYieldResult<A>nextResult
let nextResult:
| IteratorResult<A, any>
| undefined
nextResult = var undefinedundefined
} else {
let result: IteratorResult<A, any>result = const iterator: Iterator<A, any, any>iterator.Iterator<A, any, any>.next(...[value]: [] | [any]): IteratorResult<A, any>next()
if (let result: IteratorResult<A, any>result.done?: boolean | undefineddone) {
return { IteratorReturnResult<TReturn>.done: truedone: true, IteratorReturnResult<any>.value: anyvalue: var undefinedundefined }
}
}
const const chunk: NonEmptyArray<A>const chunk: {
0: A;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => A | undefined;
push: (...items: Array<A>) => number;
concat: { (...items: Array<ConcatArray<A>>): Array<A>; (...items: Array<A | ConcatArray<A>>): Array<A> };
join: (separator?: string) => string;
reverse: () => Array<A>;
shift: () => A | undefined;
slice: (start?: number, end?: number) => Array<A>;
sort: (compareFn?: ((a: A, b: A) => number) | undefined) => [A, ...A[]];
splice: { (start: number, deleteCount?: number): Array<A>; (start: number, deleteCount: number, ...items: Array<A>): Array<A> };
unshift: (...items: Array<A>) => number;
indexOf: (searchElement: A, fromIndex?: number) => number;
lastIndexOf: (searchElement: A, fromIndex?: number) => number;
every: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): this is S[]; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: A, index: number, array: Array<A>) => void, thisArg?: any) => void;
map: (callbackfn: (value: A, index: number, array: Array<A>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): Array<S>; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): Array<A> };
reduce: { (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A): A; (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A, initialValue: A): A; (callbackfn: (previousVa…;
reduceRight: { (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A): A; (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A, initialValue: A): A; (callbackfn: (previousVa…;
find: { (predicate: (value: A, index: number, obj: Array<A>) => value is S, thisArg?: any): S | undefined; (predicate: (value: A, index: number, obj: Array<A>) => unknown, thisArg?: any): A | undefined };
findIndex: (predicate: (value: A, index: number, obj: Array<A>) => unknown, thisArg?: any) => number;
fill: (value: A, start?: number, end?: number) => [A, ...A[]];
copyWithin: (target: number, start: number, end?: number) => [A, ...A[]];
entries: () => ArrayIterator<[number, A]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<A>;
includes: (searchElement: A, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: A, index: number, array: Array<A>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => A | undefined;
findLast: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): S | undefined; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): A | undefined };
findLastIndex: (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any) => number;
toReversed: () => Array<A>;
toSorted: (compareFn?: ((a: A, b: A) => number) | undefined) => Array<A>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<A>): Array<A>; (start: number, deleteCount?: number): Array<A> };
with: (index: number, value: A) => Array<A>;
}
chunk: import NonEmptyArrayNonEmptyArray<function (type parameter) A in <A>(self: Iterable<A>, isEquivalent: (self: A, that: A) => boolean): Iterable<NonEmptyArray<A>>A> = [let result: IteratorYieldResult<A>result.IteratorYieldResult<A>.value: Avalue]
while (true) {
const const next: IteratorResult<A, any>next = const iterator: Iterator<A, any, any>iterator.Iterator<A, any, any>.next(...[value]: [] | [any]): IteratorResult<A, any>next()
if (const next: IteratorResult<A, any>next.done?: boolean | undefineddone || !isEquivalent: (self: A, that: A) => booleanisEquivalent(let result: IteratorYieldResult<A>result.IteratorYieldResult<A>.value: Avalue, const next: IteratorYieldResult<A>next.IteratorYieldResult<A>.value: Avalue)) {
let nextResult:
| IteratorResult<A, any>
| undefined
nextResult = const next: IteratorResult<A, any>next
return { IteratorYieldResult<TYield>.done?: false | undefineddone: false, IteratorYieldResult<NonEmptyArray<A>>.value: NonEmptyArray<A>(property) IteratorYieldResult<NonEmptyArray<A>>.value: {
0: A;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => A | undefined;
push: (...items: Array<A>) => number;
concat: { (...items: Array<ConcatArray<A>>): Array<A>; (...items: Array<A | ConcatArray<A>>): Array<A> };
join: (separator?: string) => string;
reverse: () => Array<A>;
shift: () => A | undefined;
slice: (start?: number, end?: number) => Array<A>;
sort: (compareFn?: ((a: A, b: A) => number) | undefined) => [A, ...A[]];
splice: { (start: number, deleteCount?: number): Array<A>; (start: number, deleteCount: number, ...items: Array<A>): Array<A> };
unshift: (...items: Array<A>) => number;
indexOf: (searchElement: A, fromIndex?: number) => number;
lastIndexOf: (searchElement: A, fromIndex?: number) => number;
every: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): this is S[]; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: A, index: number, array: Array<A>) => void, thisArg?: any) => void;
map: (callbackfn: (value: A, index: number, array: Array<A>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): Array<S>; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): Array<A> };
reduce: { (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A): A; (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A, initialValue: A): A; (callbackfn: (previousVa…;
reduceRight: { (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A): A; (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A, initialValue: A): A; (callbackfn: (previousVa…;
find: { (predicate: (value: A, index: number, obj: Array<A>) => value is S, thisArg?: any): S | undefined; (predicate: (value: A, index: number, obj: Array<A>) => unknown, thisArg?: any): A | undefined };
findIndex: (predicate: (value: A, index: number, obj: Array<A>) => unknown, thisArg?: any) => number;
fill: (value: A, start?: number, end?: number) => [A, ...A[]];
copyWithin: (target: number, start: number, end?: number) => [A, ...A[]];
entries: () => ArrayIterator<[number, A]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<A>;
includes: (searchElement: A, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: A, index: number, array: Array<A>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => A | undefined;
findLast: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): S | undefined; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): A | undefined };
findLastIndex: (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any) => number;
toReversed: () => Array<A>;
toSorted: (compareFn?: ((a: A, b: A) => number) | undefined) => Array<A>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<A>): Array<A>; (start: number, deleteCount?: number): Array<A> };
with: (index: number, value: A) => Array<A>;
}
value: const chunk: NonEmptyArray<A>const chunk: {
0: A;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => A | undefined;
push: (...items: Array<A>) => number;
concat: { (...items: Array<ConcatArray<A>>): Array<A>; (...items: Array<A | ConcatArray<A>>): Array<A> };
join: (separator?: string) => string;
reverse: () => Array<A>;
shift: () => A | undefined;
slice: (start?: number, end?: number) => Array<A>;
sort: (compareFn?: ((a: A, b: A) => number) | undefined) => [A, ...A[]];
splice: { (start: number, deleteCount?: number): Array<A>; (start: number, deleteCount: number, ...items: Array<A>): Array<A> };
unshift: (...items: Array<A>) => number;
indexOf: (searchElement: A, fromIndex?: number) => number;
lastIndexOf: (searchElement: A, fromIndex?: number) => number;
every: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): this is S[]; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: A, index: number, array: Array<A>) => void, thisArg?: any) => void;
map: (callbackfn: (value: A, index: number, array: Array<A>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): Array<S>; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): Array<A> };
reduce: { (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A): A; (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A, initialValue: A): A; (callbackfn: (previousVa…;
reduceRight: { (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A): A; (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A, initialValue: A): A; (callbackfn: (previousVa…;
find: { (predicate: (value: A, index: number, obj: Array<A>) => value is S, thisArg?: any): S | undefined; (predicate: (value: A, index: number, obj: Array<A>) => unknown, thisArg?: any): A | undefined };
findIndex: (predicate: (value: A, index: number, obj: Array<A>) => unknown, thisArg?: any) => number;
fill: (value: A, start?: number, end?: number) => [A, ...A[]];
copyWithin: (target: number, start: number, end?: number) => [A, ...A[]];
entries: () => ArrayIterator<[number, A]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<A>;
includes: (searchElement: A, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: A, index: number, array: Array<A>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => A | undefined;
findLast: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): S | undefined; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): A | undefined };
findLastIndex: (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any) => number;
toReversed: () => Array<A>;
toSorted: (compareFn?: ((a: A, b: A) => number) | undefined) => Array<A>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<A>): Array<A>; (start: number, deleteCount?: number): Array<A> };
with: (index: number, value: A) => Array<A>;
}
chunk }
}
const chunk: NonEmptyArray<A>const chunk: {
0: A;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
pop: () => A | undefined;
push: (...items: Array<A>) => number;
concat: { (...items: Array<ConcatArray<A>>): Array<A>; (...items: Array<A | ConcatArray<A>>): Array<A> };
join: (separator?: string) => string;
reverse: () => Array<A>;
shift: () => A | undefined;
slice: (start?: number, end?: number) => Array<A>;
sort: (compareFn?: ((a: A, b: A) => number) | undefined) => [A, ...A[]];
splice: { (start: number, deleteCount?: number): Array<A>; (start: number, deleteCount: number, ...items: Array<A>): Array<A> };
unshift: (...items: Array<A>) => number;
indexOf: (searchElement: A, fromIndex?: number) => number;
lastIndexOf: (searchElement: A, fromIndex?: number) => number;
every: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): this is S[]; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: A, index: number, array: Array<A>) => void, thisArg?: any) => void;
map: (callbackfn: (value: A, index: number, array: Array<A>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): Array<S>; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): Array<A> };
reduce: { (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A): A; (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A, initialValue: A): A; (callbackfn: (previousVa…;
reduceRight: { (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A): A; (callbackfn: (previousValue: A, currentValue: A, currentIndex: number, array: Array<A>) => A, initialValue: A): A; (callbackfn: (previousVa…;
find: { (predicate: (value: A, index: number, obj: Array<A>) => value is S, thisArg?: any): S | undefined; (predicate: (value: A, index: number, obj: Array<A>) => unknown, thisArg?: any): A | undefined };
findIndex: (predicate: (value: A, index: number, obj: Array<A>) => unknown, thisArg?: any) => number;
fill: (value: A, start?: number, end?: number) => [A, ...A[]];
copyWithin: (target: number, start: number, end?: number) => [A, ...A[]];
entries: () => ArrayIterator<[number, A]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<A>;
includes: (searchElement: A, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: A, index: number, array: Array<A>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => A | undefined;
findLast: { (predicate: (value: A, index: number, array: Array<A>) => value is S, thisArg?: any): S | undefined; (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any): A | undefined };
findLastIndex: (predicate: (value: A, index: number, array: Array<A>) => unknown, thisArg?: any) => number;
toReversed: () => Array<A>;
toSorted: (compareFn?: ((a: A, b: A) => number) | undefined) => Array<A>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<A>): Array<A>; (start: number, deleteCount?: number): Array<A> };
with: (index: number, value: A) => Array<A>;
}
chunk.push(const next: IteratorYieldResult<A>next.IteratorYieldResult<A>.value: Avalue)
}
}
}
}
})
)Referenced by 1 symbols