import { IComparer, IEqualityComparer, IDisposable, IEnumerator } from "./Util.js"; import { TypeInfo } from "./Reflection.js"; import { Option } from "./Option.js"; import { FSharpList } from "./List.js"; import { int32 } from "./Int32.js"; export declare const SR_enumerationAlreadyFinished = "Enumeration already finished."; export declare const SR_enumerationNotStarted = "Enumeration has not started. Call MoveNext."; export declare const SR_inputSequenceEmpty = "The input sequence was empty."; export declare const SR_inputSequenceTooLong = "The input sequence contains more than one element."; export declare const SR_keyNotFoundAlt = "An index satisfying the predicate was not found in the collection."; export declare const SR_notEnoughElements = "The input sequence has an insufficient number of elements."; export declare const SR_resetNotSupported = "Reset is not supported on this enumerator."; export declare function Enumerator_noReset<$a>(): $a; export declare function Enumerator_notStarted<$a>(): $a; export declare function Enumerator_alreadyFinished<$a>(): $a; export declare class Enumerator_Seq implements Iterable { readonly f: (() => IEnumerator); constructor(f: (() => IEnumerator)); toString(): string; GetEnumerator(): IEnumerator; [Symbol.iterator](): Iterator; "System.Collections.IEnumerable.GetEnumerator"(): IEnumerator; } export declare function Enumerator_Seq_$reflection(gen0: TypeInfo): TypeInfo; export declare function Enumerator_Seq_$ctor_673A07F2(f: (() => IEnumerator)): Enumerator_Seq; export declare class Enumerator_FromFunctions$1 implements IEnumerator, IDisposable { readonly next: (() => boolean); readonly dispose: (() => void); readonly current: (() => T); constructor(current: (() => T), next: (() => boolean), dispose: (() => void)); "System.Collections.Generic.IEnumerator`1.get_Current"(): T; "System.Collections.IEnumerator.get_Current"(): any; "System.Collections.IEnumerator.MoveNext"(): boolean; "System.Collections.IEnumerator.Reset"(): void; Dispose(): void; } export declare function Enumerator_FromFunctions$1_$reflection(gen0: TypeInfo): TypeInfo; export declare function Enumerator_FromFunctions$1_$ctor_58C54629(current: (() => T), next: (() => boolean), dispose: (() => void)): Enumerator_FromFunctions$1; export declare function Enumerator_cast(e: IEnumerator): IEnumerator; export declare function Enumerator_concat>(sources: Iterable): IEnumerator; export declare function Enumerator_enumerateThenFinally(f: (() => void), e: IEnumerator): IEnumerator; export declare function Enumerator_generateWhileSome(openf: (() => T), compute: ((arg0: T) => Option), closef: ((arg0: T) => void)): IEnumerator; export declare function Enumerator_unfold(f: ((arg0: State) => Option<[T, State]>), state: State): IEnumerator; export declare function indexNotFound<$a>(): $a; export declare function checkNonNull<$a>(argName: string, arg: $a): void; export declare function mkSeq(f: (() => IEnumerator)): Iterable; export declare function ofSeq(xs: Iterable): IEnumerator; export declare function delay(generator: (() => Iterable)): Iterable; export declare function concat, T>(sources: Iterable): Iterable; export declare function unfold(generator: ((arg0: State) => Option<[T, State]>), state: State): Iterable; export declare function empty(): Iterable; export declare function singleton(x: T): Iterable; export declare function ofArray(arr: T[]): Iterable; export declare function toArray(xs: Iterable): T[]; export declare function ofList(xs: FSharpList): Iterable; export declare function toList(xs: Iterable): FSharpList; export declare function generate<$a, $b>(create: (() => $a), compute: ((arg0: $a) => Option<$b>), dispose: ((arg0: $a) => void)): Iterable<$b>; export declare function generateIndexed<$a, $b>(create: (() => $a), compute: ((arg0: int32, arg1: $a) => Option<$b>), dispose: ((arg0: $a) => void)): Iterable<$b>; export declare function append(xs: Iterable, ys: Iterable): Iterable; export declare function cast(xs: Iterable): Iterable; export declare function choose(chooser: ((arg0: T) => Option), xs: Iterable): Iterable; export declare function compareWith(comparer: ((arg0: T, arg1: T) => int32), xs: Iterable, ys: Iterable): int32; export declare function contains(value: T, xs: Iterable, comparer: IEqualityComparer): boolean; export declare function enumerateFromFunctions<$a, $b>(create: (() => $a), moveNext: ((arg0: $a) => boolean), current: ((arg0: $a) => $b)): Iterable<$b>; export declare function enumerateThenFinally(source: Iterable, compensation: (() => void)): Iterable; export declare function enumerateUsing, U>(resource: T, source: ((arg0: T) => $a)): Iterable; export declare function enumerateWhile(guard: (() => boolean), xs: Iterable): Iterable; export declare function filter(f: ((arg0: T) => boolean), xs: Iterable): Iterable; export declare function exists(predicate: ((arg0: T) => boolean), xs: Iterable): boolean; export declare function exists2(predicate: ((arg0: T1, arg1: T2) => boolean), xs: Iterable, ys: Iterable): boolean; export declare function exactlyOne(xs: Iterable): T; export declare function tryExactlyOne(xs: Iterable): Option; export declare function tryFind(predicate: ((arg0: T) => boolean), xs: Iterable): Option; export declare function find(predicate: ((arg0: T) => boolean), xs: Iterable): T; export declare function tryFindBack(predicate: ((arg0: T) => boolean), xs: Iterable): Option; export declare function findBack(predicate: ((arg0: T) => boolean), xs: Iterable): T; export declare function tryFindIndex(predicate: ((arg0: T) => boolean), xs: Iterable): Option; export declare function findIndex(predicate: ((arg0: T) => boolean), xs: Iterable): int32; export declare function tryFindIndexBack(predicate: ((arg0: T) => boolean), xs: Iterable): Option; export declare function findIndexBack(predicate: ((arg0: T) => boolean), xs: Iterable): int32; export declare function fold(folder: ((arg0: State, arg1: T) => State), state: State, xs: Iterable): State; export declare function foldBack(folder: ((arg0: T, arg1: any) => any), xs: Iterable, state: any): any; export declare function fold2(folder: ((arg0: State, arg1: T1, arg2: T2) => State), state: State, xs: Iterable, ys: Iterable): State; export declare function foldBack2(folder: ((arg0: T1, arg1: T2, arg2: State) => State), xs: Iterable, ys: Iterable, state: State): State; export declare function forAll<$a>(predicate: ((arg0: $a) => boolean), xs: Iterable<$a>): boolean; export declare function forAll2<$a, $b>(predicate: ((arg0: $a, arg1: $b) => boolean), xs: Iterable<$a>, ys: Iterable<$b>): boolean; export declare function tryHead(xs: Iterable): Option; export declare function head(xs: Iterable): T; export declare function initialize<$a>(count: int32, f: ((arg0: int32) => $a)): Iterable<$a>; export declare function initializeInfinite<$a>(f: ((arg0: int32) => $a)): Iterable<$a>; export declare function isEmpty(xs: Iterable): boolean; export declare function tryItem(index: int32, xs: Iterable): Option; export declare function item(index: int32, xs: Iterable): T; export declare function iterate<$a>(action: ((arg0: $a) => void), xs: Iterable<$a>): void; export declare function iterate2<$a, $b>(action: ((arg0: $a, arg1: $b) => void), xs: Iterable<$a>, ys: Iterable<$b>): void; export declare function iterateIndexed<$a>(action: ((arg0: int32, arg1: $a) => void), xs: Iterable<$a>): void; export declare function iterateIndexed2<$a, $b>(action: ((arg0: int32, arg1: $a, arg2: $b) => void), xs: Iterable<$a>, ys: Iterable<$b>): void; export declare function tryLast(xs: Iterable): Option; export declare function last(xs: Iterable): T; export declare function length(xs: Iterable): int32; export declare function map(mapping: ((arg0: T) => U), xs: Iterable): Iterable; export declare function mapIndexed(mapping: ((arg0: int32, arg1: T) => U), xs: Iterable): Iterable; export declare function indexed(xs: Iterable): Iterable<[int32, T]>; export declare function map2(mapping: ((arg0: T1, arg1: T2) => U), xs: Iterable, ys: Iterable): Iterable; export declare function mapIndexed2(mapping: ((arg0: int32, arg1: T1, arg2: T2) => U), xs: Iterable, ys: Iterable): Iterable; export declare function map3(mapping: ((arg0: T1, arg1: T2, arg2: T3) => U), xs: Iterable, ys: Iterable, zs: Iterable): Iterable; export declare function readOnly(xs: Iterable): Iterable; export declare class CachedSeq$1 implements Iterable, IDisposable { readonly res: Iterable; readonly cleanup: (() => void); constructor(cleanup: (() => void), res: Iterable); Dispose(): void; GetEnumerator(): IEnumerator; [Symbol.iterator](): Iterator; "System.Collections.IEnumerable.GetEnumerator"(): IEnumerator; } export declare function CachedSeq$1_$reflection(gen0: TypeInfo): TypeInfo; export declare function CachedSeq$1_$ctor_Z7A8347D4(cleanup: (() => void), res: Iterable): CachedSeq$1; export declare function CachedSeq$1__Clear(_: CachedSeq$1): void; export declare function cache(source: Iterable): Iterable; export declare function allPairs(xs: Iterable, ys: Iterable): Iterable<[T1, T2]>; export declare function mapFold(mapping: ((arg0: State, arg1: T) => [Result, State]), state: State, xs: Iterable): [Iterable, State]; export declare function mapFoldBack(mapping: ((arg0: T, arg1: State) => [Result, State]), xs: Iterable, state: State): [Iterable, State]; export declare function tryPick(chooser: ((arg0: T) => Option<$a>), xs: Iterable): Option<$a>; export declare function pick(chooser: ((arg0: T) => Option<$a>), xs: Iterable): $a; export declare function reduce(folder: ((arg0: T, arg1: T) => T), xs: Iterable): T; export declare function reduceBack(folder: ((arg0: T, arg1: T) => T), xs: Iterable): T; export declare function replicate<$a>(n: int32, x: $a): Iterable<$a>; export declare function reverse(xs: Iterable): Iterable; export declare function scan(folder: ((arg0: State, arg1: T) => State), state: State, xs: Iterable): Iterable; export declare function scanBack(folder: ((arg0: T, arg1: State) => State), xs: Iterable, state: State): Iterable; export declare function skip(count: int32, source: Iterable): Iterable; export declare function skipWhile(predicate: ((arg0: T) => boolean), xs: Iterable): Iterable; export declare function tail(xs: Iterable): Iterable; export declare function take(count: int32, xs: Iterable): Iterable; export declare function takeWhile(predicate: ((arg0: T) => boolean), xs: Iterable): Iterable; export declare function truncate(count: int32, xs: Iterable): Iterable; export declare function zip(xs: Iterable, ys: Iterable): Iterable<[T1, T2]>; export declare function zip3(xs: Iterable, ys: Iterable, zs: Iterable): Iterable<[T1, T2, T3]>; export declare function collect, U>(mapping: ((arg0: T) => Collection), xs: Iterable): Iterable; export declare function where(predicate: ((arg0: T) => boolean), xs: Iterable): Iterable; export declare function pairwise(xs: Iterable): Iterable<[T, T]>; export declare function splitInto(chunks: int32, xs: Iterable): Iterable; export declare function windowed(windowSize: int32, xs: Iterable): Iterable; export declare function transpose<$a extends Iterable, T>(xss: Iterable<$a>): Iterable>; export declare function sortWith(comparer: ((arg0: T, arg1: T) => int32), xs: Iterable): Iterable; export declare function sort(xs: Iterable, comparer: IComparer): Iterable; export declare function sortBy(projection: ((arg0: T) => U), xs: Iterable, comparer: IComparer): Iterable; export declare function sortDescending(xs: Iterable, comparer: IComparer): Iterable; export declare function sortByDescending(projection: ((arg0: T) => U), xs: Iterable, comparer: IComparer): Iterable; export declare function sum(xs: Iterable, adder: any): T; export declare function sumBy(f: ((arg0: T) => U), xs: Iterable, adder: any): U; export declare function maxBy(projection: ((arg0: T) => U), xs: Iterable, comparer: IComparer): T; export declare function max(xs: Iterable, comparer: IComparer): T; export declare function minBy(projection: ((arg0: T) => U), xs: Iterable, comparer: IComparer): T; export declare function min(xs: Iterable, comparer: IComparer): T; export declare function average(xs: Iterable, averager: any): T; export declare function averageBy(f: ((arg0: T) => U), xs: Iterable, averager: any): U; export declare function permute(f: ((arg0: int32) => int32), xs: Iterable): Iterable; export declare function chunkBySize(chunkSize: int32, xs: Iterable): Iterable; export declare function insertAt(index: int32, y: T, xs: Iterable): Iterable; export declare function insertManyAt(index: int32, ys: Iterable, xs: Iterable): Iterable; export declare function removeAt(index: int32, xs: Iterable): Iterable; export declare function removeManyAt(index: int32, count: int32, xs: Iterable): Iterable; export declare function updateAt(index: int32, y: T, xs: Iterable): Iterable;