<In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<
Array<In>,
In,
In,
E,
R
>Collects input elements effectfully while the predicate succeeds.
Details
The first input for which the predicate returns false is consumed and
excluded from the result. Any later elements from the same pulled array are
returned as leftovers.
export const const takeWhileEffect: {
<In, E, R>(
predicate: (
input: In
) => Effect.Effect<boolean, E, R>
): Sink<Array<In>, In, In, E, R>
}
Collects input elements effectfully while the predicate succeeds.
Details
The first input for which the predicate returns false is consumed and
excluded from the result. Any later elements from the same pulled array are
returned as leftovers.
takeWhileEffect: {
<function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In, function (type parameter) E in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>E, function (type parameter) R in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>R>(predicate: (
input: In
) => Effect.Effect<boolean, E, R>
predicate: (input: Ininput: function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In) => import EffectEffect.type Effect.Effect = /*unresolved*/ anyEffect<boolean, function (type parameter) E in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>E, function (type parameter) R in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>R>): interface Sink<out A, in In = unknown, out L = never, out E = never, out R = never>A Sink<A, In, L, E, R> is used to consume elements produced by a Stream.
You can think of a sink as a function that will consume a variable amount of
In elements (could be 0, 1, or many), might fail with an error of type E,
and will eventually yield a value of type A together with a remainder of
type L (i.e. any leftovers).
Example (Running a sink with a stream)
import { Effect, Sink, Stream } from "effect"
// Create a simple sink that always succeeds with a value
const sink: Sink.Sink<number> = Sink.succeed(42)
// Use the sink to consume a stream
const stream = Stream.make(1, 2, 3)
const program = Stream.run(stream, sink)
Effect.runPromise(program).then(console.log)
// Output: 42
Namespace containing types and interfaces for Sink variance and type relationships.
Sink<interface Array<T>Array<function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In>, function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In, function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In, function (type parameter) E in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>E, function (type parameter) R in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>R>
} = <function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In, function (type parameter) E in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>E, function (type parameter) R in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>R>(
predicate: (
input: In
) => Effect.Effect<boolean, E, R>
predicate: (input: Ininput: function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In) => import EffectEffect.type Effect.Effect = /*unresolved*/ anyEffect<boolean, function (type parameter) E in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>E, function (type parameter) R in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>R>
): interface Sink<out A, in In = unknown, out L = never, out E = never, out R = never>A Sink<A, In, L, E, R> is used to consume elements produced by a Stream.
You can think of a sink as a function that will consume a variable amount of
In elements (could be 0, 1, or many), might fail with an error of type E,
and will eventually yield a value of type A together with a remainder of
type L (i.e. any leftovers).
Example (Running a sink with a stream)
import { Effect, Sink, Stream } from "effect"
// Create a simple sink that always succeeds with a value
const sink: Sink.Sink<number> = Sink.succeed(42)
// Use the sink to consume a stream
const stream = Stream.make(1, 2, 3)
const program = Stream.run(stream, sink)
Effect.runPromise(program).then(console.log)
// Output: 42
Namespace containing types and interfaces for Sink variance and type relationships.
Sink<interface Array<T>Array<function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In>, function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In, function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In, function (type parameter) E in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>E, function (type parameter) R in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>R> =>
const fromTransform: <
In,
A,
E,
R,
L = never
>(
transform: (
upstream: Pull.Pull<
NonEmptyReadonlyArray<In>,
never,
void
>,
scope: Scope.Scope
) => Effect.Effect<End<A, L>, E, R>
) => Sink<A, In, L, E, R>
Creates a Sink from a low-level transform function.
Details
The transform receives the upstream pull of non-empty input arrays and the
active scope, and returns an effect that completes with the sink's End
value.
fromTransform((upstream: Pull.Pull<
readonly [In, ...In[]],
never,
void,
never
>
(parameter) upstream: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
upstream) => {
const const out: anyout = import ArrArr.empty<function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In>()
let let leftover:
| Arr.NonEmptyReadonlyArray<In>
| undefined
leftover: import ArrArr.type Arr.NonEmptyReadonlyArray = /*unresolved*/ anyNonEmptyReadonlyArray<function (type parameter) In in <In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>In> | undefined = var undefinedundefined
return upstream: Pull.Pull<
readonly [In, ...In[]],
never,
void,
never
>
(parameter) upstream: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
upstream.pipe(
import EffectEffect.flatMap((arr: any(parameter) arr: {
0: In;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<In>>): Array<In>; (...items: Array<In | ConcatArray<In>>): Array<In> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<In>;
indexOf: (searchElement: In, fromIndex?: number) => number;
lastIndexOf: (searchElement: In, fromIndex?: number) => number;
every: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => void, thisArg?: any) => void;
map: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): Array<S>; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): Array<In> };
reduce: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
reduceRight: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
find: { (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findIndex: (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, In]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<In>;
includes: (searchElement: In, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: In, index: number, array: Array<In>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => In | undefined;
findLast: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findLastIndex: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
toReversed: () => Array<In>;
toSorted: (compareFn?: ((a: In, b: In) => number) | undefined) => Array<In>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<In>): Array<In>; (start: number, deleteCount?: number): Array<In> };
with: (index: number, value: In) => Array<In>;
}
arr) => {
let let i: numberi = 0
return import EffectEffect.whileLoop({
while: () => booleanwhile: () => let i: numberi < arr: any(parameter) arr: {
0: In;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<In>>): Array<In>; (...items: Array<In | ConcatArray<In>>): Array<In> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<In>;
indexOf: (searchElement: In, fromIndex?: number) => number;
lastIndexOf: (searchElement: In, fromIndex?: number) => number;
every: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => void, thisArg?: any) => void;
map: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): Array<S>; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): Array<In> };
reduce: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
reduceRight: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
find: { (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findIndex: (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, In]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<In>;
includes: (searchElement: In, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: In, index: number, array: Array<In>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => In | undefined;
findLast: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findLastIndex: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
toReversed: () => Array<In>;
toSorted: (compareFn?: ((a: In, b: In) => number) | undefined) => Array<In>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<In>): Array<In>; (start: number, deleteCount?: number): Array<In> };
with: (index: number, value: In) => Array<In>;
}
arr.length,
body: LazyArg<
Effect.Effect<void, Cause.Done<void> | E, R>
>
body: import constantconstant(import EffectEffect.flatMap(
import EffectEffect.suspend(() => {
const const input: anyinput = arr: any(parameter) arr: {
0: In;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<In>>): Array<In>; (...items: Array<In | ConcatArray<In>>): Array<In> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<In>;
indexOf: (searchElement: In, fromIndex?: number) => number;
lastIndexOf: (searchElement: In, fromIndex?: number) => number;
every: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => void, thisArg?: any) => void;
map: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): Array<S>; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): Array<In> };
reduce: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
reduceRight: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
find: { (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findIndex: (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, In]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<In>;
includes: (searchElement: In, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: In, index: number, array: Array<In>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => In | undefined;
findLast: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findLastIndex: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
toReversed: () => Array<In>;
toSorted: (compareFn?: ((a: In, b: In) => number) | undefined) => Array<In>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<In>): Array<In>; (start: number, deleteCount?: number): Array<In> };
with: (index: number, value: In) => Array<In>;
}
arr[let i: numberi++]
return import EffectEffect.map(predicate: (
input: In
) => Effect.Effect<boolean, E, R>
predicate(const input: anyinput), (passes: anypasses) => [const input: anyinput, passes: anypasses] as type const = readonly [any, any]const)
}),
([input: anyinput, passes: anypasses]) => {
if (!passes: anypasses) {
if (let i: numberi < arr: any(parameter) arr: {
0: In;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<In>>): Array<In>; (...items: Array<In | ConcatArray<In>>): Array<In> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<In>;
indexOf: (searchElement: In, fromIndex?: number) => number;
lastIndexOf: (searchElement: In, fromIndex?: number) => number;
every: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => void, thisArg?: any) => void;
map: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): Array<S>; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): Array<In> };
reduce: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
reduceRight: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
find: { (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findIndex: (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, In]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<In>;
includes: (searchElement: In, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: In, index: number, array: Array<In>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => In | undefined;
findLast: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findLastIndex: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
toReversed: () => Array<In>;
toSorted: (compareFn?: ((a: In, b: In) => number) | undefined) => Array<In>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<In>): Array<In>; (start: number, deleteCount?: number): Array<In> };
with: (index: number, value: In) => Array<In>;
}
arr.length) {
let leftover:
| Arr.NonEmptyReadonlyArray<In>
| undefined
leftover = arr: any(parameter) arr: {
0: In;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<In>>): Array<In>; (...items: Array<In | ConcatArray<In>>): Array<In> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<In>;
indexOf: (searchElement: In, fromIndex?: number) => number;
lastIndexOf: (searchElement: In, fromIndex?: number) => number;
every: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => void, thisArg?: any) => void;
map: (callbackfn: (value: In, index: number, array: ReadonlyArray<In>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): Array<S>; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): Array<In> };
reduce: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
reduceRight: { (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In): In; (callbackfn: (previousValue: In, currentValue: In, currentIndex: number, array: ReadonlyArray<In>) => In, initialValue: In): I…;
find: { (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findIndex: (predicate: (value: In, index: number, obj: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, In]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<In>;
includes: (searchElement: In, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: In, index: number, array: Array<In>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => In | undefined;
findLast: { (predicate: (value: In, index: number, array: ReadonlyArray<In>) => value is S, thisArg?: any): S | undefined; (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any): In | undefined };
findLastIndex: (predicate: (value: In, index: number, array: ReadonlyArray<In>) => unknown, thisArg?: any) => number;
toReversed: () => Array<In>;
toSorted: (compareFn?: ((a: In, b: In) => number) | undefined) => Array<In>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<In>): Array<In>; (start: number, deleteCount?: number): Array<In> };
with: (index: number, value: In) => Array<In>;
}
arr.slice(let i: numberi) as any
}
return import CauseCause.done()
}
const out: anyout.push(input: anyinput)
return import EffectEffect.void
}
)),
step: LazyArg<void>step: import constVoidconstVoid
})
}),
import EffectEffect.forever({ disableYield: booleandisableYield: true }),
import PullPull.catchDone(() => import EffectEffect.succeed([const out: anyout, let leftover:
| Arr.NonEmptyReadonlyArray<In>
| undefined
leftover] as type const = readonly [any, any]const))
)
})