Comparing version 2.16.6 to 2.16.7
@@ -147,3 +147,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Const<E, (a: A) => B>) => Const<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Const', E, (a: A) => B>) => import('./HKT').Kind2<'Const', E, B> | ||
/** | ||
@@ -150,0 +152,0 @@ * @category instances |
@@ -184,3 +184,3 @@ /** | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<'Either', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<URI, E> | ||
/** | ||
@@ -192,3 +192,3 @@ * Builds a `Filterable` instance for `Either` given `Monoid` for the left side | ||
*/ | ||
export declare const getFilterable: <E>(M: Monoid<E>) => Filterable2C<'Either', E> | ||
export declare const getFilterable: <E>(M: Monoid<E>) => Filterable2C<URI, E> | ||
/** | ||
@@ -200,3 +200,3 @@ * Builds `Witherable` instance for `Either` given `Monoid` for the left side | ||
*/ | ||
export declare const getWitherable: <E>(M: Monoid<E>) => Witherable2C<'Either', E> | ||
export declare const getWitherable: <E>(M: Monoid<E>) => Witherable2C<URI, E> | ||
/** | ||
@@ -255,3 +255,3 @@ * The default [`Applicative`](#applicative) instance returns the first error, if you want to | ||
*/ | ||
export declare const getApplicativeValidation: <E>(SE: Semigroup<E>) => Applicative2C<'Either', E> | ||
export declare const getApplicativeValidation: <E>(SE: Semigroup<E>) => Applicative2C<URI, E> | ||
/** | ||
@@ -291,3 +291,3 @@ * The default [`Alt`](#alt) instance returns the last error, if you want to | ||
*/ | ||
export declare const getAltValidation: <E>(SE: Semigroup<E>) => Alt2C<'Either', E> | ||
export declare const getAltValidation: <E>(SE: Semigroup<E>) => Alt2C<URI, E> | ||
/** | ||
@@ -739,3 +739,3 @@ * @category mapping | ||
*/ | ||
export declare const getOrElseW: <E, B>(onLeft: (e: E) => B) => <A>(ma: Either<E, A>) => B | A | ||
export declare const getOrElseW: <E, B>(onLeft: (e: E) => B) => <A>(ma: Either<E, A>) => A | B | ||
/** | ||
@@ -771,3 +771,5 @@ * Returns the wrapped value if it's a `Right` or a default value if is a `Left`. | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Either<E, (a: A) => B>) => Either<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Either', E, (a: A) => B>) => import('./HKT').Kind2<'Either', E, B> | ||
/** | ||
@@ -778,3 +780,5 @@ * Combine two effectful actions, keeping only the result of the first. | ||
*/ | ||
export declare const apFirst: <E, B>(second: Either<E, B>) => <A>(first: Either<E, A>) => Either<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: Either<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'Either', E, A>) => import('./HKT').Kind2<'Either', E, A> | ||
/** | ||
@@ -793,3 +797,5 @@ * Less strict version of [`apFirst`](#apfirst) | ||
*/ | ||
export declare const apSecond: <E, B>(second: Either<E, B>) => <A>(first: Either<E, A>) => Either<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: Either<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'Either', E, A>) => import('./HKT').Kind2<'Either', E, B> | ||
/** | ||
@@ -980,3 +986,3 @@ * Less strict version of [`apSecond`](#apsecond) | ||
onLeft: (e: E1) => Either<E2, B> | ||
) => <A>(ma: Either<E1, A>) => Either<E2, B | A> | ||
) => <A>(ma: Either<E1, A>) => Either<E2, A | B> | ||
/** | ||
@@ -1037,3 +1043,3 @@ * Useful for recovering from errors. | ||
*/ | ||
export declare const tryCatchK: <A extends readonly unknown[], B, E>( | ||
export declare const tryCatchK: <A extends ReadonlyArray<unknown>, B, E>( | ||
f: (...a: A) => B, | ||
@@ -1050,3 +1056,5 @@ onThrow: (error: unknown) => E | ||
e: E | ||
) => <A extends readonly unknown[], B>(f: (...a: A) => B | null | undefined) => (...a: A) => Either<E, NonNullable<B>> | ||
) => <A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => B | null | undefined | ||
) => (...a: A) => Either<E, NonNullable<B>> | ||
/** | ||
@@ -1105,7 +1113,9 @@ * Use `flatMapNullable`. | ||
name: N | ||
) => <E, A>(fa: Either<E, A>) => Either<E, { readonly [K in N]: A }> | ||
) => <E, A>(fa: import('./HKT').Kind2<'Either', E, A>) => import('./HKT').Kind2<'Either', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: Either<E, A>) => Either<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'Either', E, A> | ||
) => import('./HKT').Kind2<'Either', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -1124,4 +1134,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Either<E, B> | ||
) => (ma: Either<E, A>) => Either<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'Either', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'Either', E, A> | ||
) => import('./HKT').Kind2<'Either', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1149,3 +1161,5 @@ * The `W` suffix (short for **W**idening) means that the error types will be merged. | ||
fb: Either<E, B> | ||
) => (fa: Either<E, A>) => Either<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'Either', E, A> | ||
) => import('./HKT').Kind2<'Either', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1189,3 +1203,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => Either<E, B> | ||
) => (as: readonly A[]) => Either<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Either<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1208,3 +1222,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => Either<E, B> | ||
) => (as: readonly A[]) => Either<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Either<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1211,0 +1225,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -27,7 +27,7 @@ /** | ||
*/ | ||
export declare const fromEquals: <A>(equals: (x: A, y: A) => boolean) => Eq<A> | ||
export declare const fromEquals: <A>(equals: Eq<A>['equals']) => Eq<A> | ||
/** | ||
* @since 2.10.0 | ||
*/ | ||
export declare const struct: <A>(eqs: { [K in keyof A]: Eq<A[K]> }) => Eq<{ readonly [K_1 in keyof A]: A[K_1] }> | ||
export declare const struct: <A>(eqs: { [K in keyof A]: Eq<A[K]> }) => Eq<{ readonly [K in keyof A]: A[K] }> | ||
/** | ||
@@ -50,3 +50,3 @@ * Given a tuple of `Eq`s returns a `Eq` for the tuple | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>(...eqs: { [K in keyof A]: Eq<A[K]> }) => Eq<Readonly<A>> | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>(...eqs: { [K in keyof A]: Eq<A[K]> }) => Eq<Readonly<A>> | ||
/** | ||
@@ -53,0 +53,0 @@ * A typical use case for `contramap` would be like, given some `User` type, to construct an `Eq<User>`. |
@@ -142,3 +142,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: (a: A) => B) => B | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'Identity', (a: A) => B>) => import('./HKT').Kind<'Identity', B> | ||
/** | ||
@@ -159,3 +161,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: B) => <A>(first: A) => A | ||
export declare const apFirst: <B>( | ||
second: B | ||
) => <A>(first: import('./HKT').Kind<'Identity', A>) => import('./HKT').Kind<'Identity', A> | ||
/** | ||
@@ -166,3 +170,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: B) => <A>(first: A) => B | ||
export declare const apSecond: <B>( | ||
second: B | ||
) => <A>(first: import('./HKT').Kind<'Identity', A>) => import('./HKT').Kind<'Identity', B> | ||
/** | ||
@@ -187,3 +193,13 @@ * @category instances | ||
* | ||
* @category sequencing | ||
* @category combinators | ||
* @since 2.16.7 | ||
*/ | ||
export declare const tap: { | ||
<A, _>(self: Identity<A>, f: (a: A) => Identity<_>): Identity<A> | ||
<A, _>(f: (a: A) => Identity<_>): (self: Identity<A>) => Identity<A> | ||
} | ||
/** | ||
* Alias of `tap` | ||
* | ||
* @category legacy | ||
* @since 2.0.0 | ||
@@ -226,7 +242,11 @@ */ | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: A) => { readonly [K in N]: A } | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'Identity', A>) => import('./HKT').Kind<'Identity', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: A) => { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B } | ||
) => ( | ||
fa: import('./HKT').Kind<'Identity', A> | ||
) => import('./HKT').Kind<'Identity', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -245,4 +265,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (ma: A) => { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B } | ||
f: (a: A) => import('./HKT').Kind<'Identity', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'Identity', A> | ||
) => import('./HKT').Kind<'Identity', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -255,3 +277,5 @@ * @category do notation | ||
fb: B | ||
) => (fa: A) => { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B } | ||
) => ( | ||
fa: import('./HKT').Kind<'Identity', A> | ||
) => import('./HKT').Kind<'Identity', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -258,0 +282,0 @@ * Alias of `flatMap`. |
import { apFirst as apFirst_, apS as apS_, apSecond as apSecond_ } from './Apply'; | ||
import { bind as bind_, chainFirst as chainFirst_ } from './Chain'; | ||
import { bind as bind_, tap as tap_ } from './Chain'; | ||
import { tailRec } from './ChainRec'; | ||
@@ -209,6 +209,13 @@ import { dual, identity as id, pipe } from './function'; | ||
* | ||
* @category sequencing | ||
* @category combinators | ||
* @since 2.16.7 | ||
*/ | ||
export var tap = /*#__PURE__*/ dual(2, tap_(Chain)); | ||
/** | ||
* Alias of `tap` | ||
* | ||
* @category legacy | ||
* @since 2.0.0 | ||
*/ | ||
export var chainFirst = /*#__PURE__*/ chainFirst_(Chain); | ||
export var chainFirst = tap; | ||
/** | ||
@@ -215,0 +222,0 @@ * @category instances |
@@ -106,3 +106,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: IO<(a: A) => B>) => IO<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'IO', (a: A) => B>) => import('./HKT').Kind<'IO', B> | ||
/** | ||
@@ -123,3 +125,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: IO<B>) => <A>(first: IO<A>) => IO<A> | ||
export declare const apFirst: <B>( | ||
second: IO<B> | ||
) => <A>(first: import('./HKT').Kind<'IO', A>) => import('./HKT').Kind<'IO', A> | ||
/** | ||
@@ -130,3 +134,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: IO<B>) => <A>(first: IO<A>) => IO<B> | ||
export declare const apSecond: <B>( | ||
second: IO<B> | ||
) => <A>(first: import('./HKT').Kind<'IO', A>) => import('./HKT').Kind<'IO', B> | ||
/** | ||
@@ -188,7 +194,11 @@ * @category instances | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: IO<A>) => IO<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'IO', A>) => import('./HKT').Kind<'IO', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: IO<A>) => IO<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'IO', A> | ||
) => import('./HKT').Kind<'IO', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -207,4 +217,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => IO<B> | ||
) => (ma: IO<A>) => IO<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'IO', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'IO', A> | ||
) => import('./HKT').Kind<'IO', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -217,3 +229,5 @@ * @category do notation | ||
fb: IO<B> | ||
) => (fa: IO<A>) => IO<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'IO', A> | ||
) => import('./HKT').Kind<'IO', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -240,3 +254,3 @@ * @since 2.11.0 | ||
f: (index: number, a: A) => IO<B> | ||
) => (as: readonly A[]) => IO<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IO<ReadonlyArray<B>> | ||
/** | ||
@@ -257,3 +271,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
*/ | ||
export declare const traverseArray: <A, B>(f: (a: A) => IO<B>) => (as: readonly A[]) => IO<readonly B[]> | ||
export declare const traverseArray: <A, B>(f: (a: A) => IO<B>) => (as: ReadonlyArray<A>) => IO<ReadonlyArray<B>> | ||
/** | ||
@@ -260,0 +274,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -103,6 +103,3 @@ /** | ||
*/ | ||
export declare const fold: <E, A, B>( | ||
onLeft: (e: E) => I.IO<B>, | ||
onRight: (a: A) => I.IO<B> | ||
) => (ma: IOEither<E, A>) => I.IO<B> | ||
export declare const fold: <E, A, B>(onLeft: (e: E) => IO<B>, onRight: (a: A) => IO<B>) => (ma: IOEither<E, A>) => IO<B> | ||
/** | ||
@@ -127,5 +124,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, B, A, C>( | ||
onLeft: (e: E) => I.IO<B>, | ||
onRight: (a: A) => I.IO<C> | ||
) => (ma: IOEither<E, A>) => I.IO<B | C> | ||
onLeft: (e: E) => IO<B>, | ||
onRight: (a: A) => IO<C> | ||
) => (ma: IOEither<E, A>) => IO<B | C> | ||
/** | ||
@@ -160,3 +157,3 @@ * @category error handling | ||
*/ | ||
export declare const tryCatchK: <A extends readonly unknown[], B, E>( | ||
export declare const tryCatchK: <A extends ReadonlyArray<unknown>, B, E>( | ||
f: (...a: A) => B, | ||
@@ -374,3 +371,3 @@ onThrow: (reason: unknown) => E | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<'IOEither', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<URI, E> | ||
/** | ||
@@ -407,3 +404,5 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: IOEither<E, (a: A) => B>) => IOEither<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'IOEither', E, (a: A) => B>) => import('./HKT').Kind2<'IOEither', E, B> | ||
/** | ||
@@ -431,3 +430,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: IOEither<E, B>) => <A>(first: IOEither<E, A>) => IOEither<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: IOEither<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'IOEither', E, A>) => import('./HKT').Kind2<'IOEither', E, A> | ||
/** | ||
@@ -448,3 +449,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
*/ | ||
export declare const apSecond: <E, B>(second: IOEither<E, B>) => <A>(first: IOEither<E, A>) => IOEither<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: IOEither<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'IOEither', E, A>) => import('./HKT').Kind2<'IOEither', E, B> | ||
/** | ||
@@ -764,3 +767,3 @@ * Less strict version of [`apSecond`](#apsecond). | ||
use: (a: A) => IOEither<E, B>, | ||
release: (a: A, e: E.Either<E, B>) => IOEither<E, void> | ||
release: (a: A, e: Either<E, B>) => IOEither<E, void> | ||
) => IOEither<E, B> | ||
@@ -790,7 +793,11 @@ /** | ||
name: N | ||
) => <E, A>(fa: IOEither<E, A>) => IOEither<E, { readonly [K in N]: A }> | ||
) => <E, A>( | ||
fa: import('./HKT').Kind2<'IOEither', E, A> | ||
) => import('./HKT').Kind2<'IOEither', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: IOEither<E, A>) => IOEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'IOEither', E, A> | ||
) => import('./HKT').Kind2<'IOEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -809,4 +816,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => IOEither<E, B> | ||
) => (ma: IOEither<E, A>) => IOEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'IOEither', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'IOEither', E, A> | ||
) => import('./HKT').Kind2<'IOEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -834,3 +843,5 @@ * The `W` suffix (short for **W**idening) means that the error types will be merged. | ||
fb: IOEither<E, B> | ||
) => (fa: IOEither<E, A>) => IOEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'IOEither', E, A> | ||
) => import('./HKT').Kind2<'IOEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -874,3 +885,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => IOEither<E, B> | ||
) => (as: readonly A[]) => IOEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -893,3 +904,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => IOEither<E, B> | ||
) => (as: readonly A[]) => IOEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -912,3 +923,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => IOEither<E, B> | ||
) => (as: readonly A[]) => IOEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -938,3 +949,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
f: (a: A) => IOEither<E, B> | ||
) => (as: readonly A[]) => IOEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -941,0 +952,0 @@ * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. |
@@ -100,3 +100,3 @@ /** | ||
*/ | ||
export declare const fold: <B, A>(onNone: () => I.IO<B>, onSome: (a: A) => I.IO<B>) => (ma: IOOption<A>) => I.IO<B> | ||
export declare const fold: <B, A>(onNone: () => IO<B>, onSome: (a: A) => IO<B>) => (ma: IOOption<A>) => IO<B> | ||
/** | ||
@@ -297,3 +297,5 @@ * Less strict version of [`matchE`](#matche). | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: IOOption<(a: A) => B>) => IOOption<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'IOOption', (a: A) => B>) => import('./HKT').Kind<'IOOption', B> | ||
/** | ||
@@ -314,3 +316,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: IOOption<B>) => <A>(first: IOOption<A>) => IOOption<A> | ||
export declare const apFirst: <B>( | ||
second: IOOption<B> | ||
) => <A>(first: import('./HKT').Kind<'IOOption', A>) => import('./HKT').Kind<'IOOption', A> | ||
/** | ||
@@ -321,3 +325,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: IOOption<B>) => <A>(first: IOOption<A>) => IOOption<B> | ||
export declare const apSecond: <B>( | ||
second: IOOption<B> | ||
) => <A>(first: import('./HKT').Kind<'IOOption', A>) => import('./HKT').Kind<'IOOption', B> | ||
/** | ||
@@ -429,3 +435,3 @@ * @category instances | ||
*/ | ||
export declare const guard: (b: boolean) => IOOption<void> | ||
export declare const guard: (b: boolean) => import('./HKT').Kind<'IOOption', void> | ||
/** | ||
@@ -544,7 +550,11 @@ * @category instances | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: IOOption<A>) => IOOption<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'IOOption', A>) => import('./HKT').Kind<'IOOption', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: IOOption<A>) => IOOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'IOOption', A> | ||
) => import('./HKT').Kind<'IOOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -563,4 +573,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => IOOption<B> | ||
) => (ma: IOOption<A>) => IOOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'IOOption', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'IOOption', A> | ||
) => import('./HKT').Kind<'IOOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -573,3 +585,5 @@ * @category do notation | ||
fb: IOOption<B> | ||
) => (fa: IOOption<A>) => IOOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'IOOption', A> | ||
) => import('./HKT').Kind<'IOOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -596,3 +610,3 @@ * @since 2.12.0 | ||
f: (index: number, a: A) => IOOption<B> | ||
) => (as: readonly A[]) => IOOption<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOOption<ReadonlyArray<B>> | ||
/** | ||
@@ -599,0 +613,0 @@ * Alias of `flatMap`. |
@@ -58,2 +58,2 @@ /** | ||
*/ | ||
export declare const concatAll: <A>(M: Magma<A>) => (startWith: A) => (as: readonly A[]) => A | ||
export declare const concatAll: <A>(M: Magma<A>) => (startWith: A) => (as: ReadonlyArray<A>) => A |
@@ -63,3 +63,3 @@ import { Compactable2 } from './Compactable' | ||
*/ | ||
export declare const keys: <K>(O: Ord<K>) => <A>(m: Map<K, A>) => K[] | ||
export declare const keys: <K>(O: Ord<K>) => <A>(m: Map<K, A>) => Array<K> | ||
/** | ||
@@ -70,3 +70,3 @@ * Get a sorted `Array` of the values contained in a `Map`. | ||
*/ | ||
export declare const values: <A>(O: Ord<A>) => <K>(m: Map<K, A>) => A[] | ||
export declare const values: <A>(O: Ord<A>) => <K>(m: Map<K, A>) => Array<A> | ||
/** | ||
@@ -107,7 +107,7 @@ * @since 2.0.0 | ||
*/ | ||
export declare const updateAt: <K>(E: Eq<K>) => <A>(k: K, a: A) => (m: Map<K, A>) => O.Option<Map<K, A>> | ||
export declare const updateAt: <K>(E: Eq<K>) => <A>(k: K, a: A) => (m: Map<K, A>) => Option<Map<K, A>> | ||
/** | ||
* @since 2.0.0 | ||
*/ | ||
export declare const modifyAt: <K>(E: Eq<K>) => <A>(k: K, f: (a: A) => A) => (m: Map<K, A>) => O.Option<Map<K, A>> | ||
export declare const modifyAt: <K>(E: Eq<K>) => <A>(k: K, f: (a: A) => A) => (m: Map<K, A>) => Option<Map<K, A>> | ||
/** | ||
@@ -212,3 +212,3 @@ * Delete a key and value from a map, returning the value as well as the subsequent map | ||
*/ | ||
export declare const filterMapWithIndex: <K, A, B>(f: (k: K, a: A) => O.Option<B>) => (fa: Map<K, A>) => Map<K, B> | ||
export declare const filterMapWithIndex: <K, A, B>(f: (k: K, a: A) => Option<B>) => (fa: Map<K, A>) => Map<K, B> | ||
/** | ||
@@ -224,3 +224,3 @@ * @since 2.10.0 | ||
*/ | ||
export declare const compact: <K, A>(fa: Map<K, O.Option<A>>) => Map<K, A> | ||
export declare const compact: <K, A>(fa: Map<K, Option<A>>) => Map<K, A> | ||
/** | ||
@@ -338,3 +338,3 @@ * @category filtering | ||
*/ | ||
export declare const getFoldable: <K>(O: Ord<K>) => Foldable2C<'Map', K> | ||
export declare const getFoldable: <K>(O: Ord<K>) => Foldable2C<URI, K> | ||
/** | ||
@@ -363,3 +363,3 @@ * @category folding | ||
*/ | ||
export declare const getFoldableWithIndex: <K>(O: Ord<K>) => FoldableWithIndex2C<'Map', K, K> | ||
export declare const getFoldableWithIndex: <K>(O: Ord<K>) => FoldableWithIndex2C<URI, K, K> | ||
/** | ||
@@ -369,3 +369,3 @@ * @category traversing | ||
*/ | ||
export declare const getTraversableWithIndex: <K>(O: Ord<K>) => TraversableWithIndex2C<'Map', K, K> | ||
export declare const getTraversableWithIndex: <K>(O: Ord<K>) => TraversableWithIndex2C<URI, K, K> | ||
/** | ||
@@ -380,3 +380,3 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Map<E, (a: A) => B>) => Map<E, B> | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Kind2<'Map', E, (a: A) => B>) => Kind2<'Map', E, B> | ||
/** | ||
@@ -383,0 +383,0 @@ * @category instances |
@@ -113,5 +113,3 @@ /** | ||
*/ | ||
export declare const struct: <A>(monoids: { [K in keyof A]: Monoid<A[K]> }) => Monoid<{ | ||
readonly [K_1 in keyof A]: A[K_1] | ||
}> | ||
export declare const struct: <A>(monoids: { [K in keyof A]: Monoid<A[K]> }) => Monoid<{ readonly [K in keyof A]: A[K] }> | ||
/** | ||
@@ -134,3 +132,3 @@ * Given a tuple of monoids returns a monoid for the tuple. | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>( | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...monoids: { [K in keyof A]: Monoid<A[K]> } | ||
@@ -152,3 +150,3 @@ ) => Monoid<Readonly<A>> | ||
*/ | ||
export declare const concatAll: <A>(M: Monoid<A>) => (as: readonly A[]) => A | ||
export declare const concatAll: <A>(M: Monoid<A>) => (as: ReadonlyArray<A>) => A | ||
/** | ||
@@ -215,3 +213,3 @@ * Use [`Monoid`](./void.ts.html#monoid) instead. | ||
*/ | ||
export declare const fold: <A>(M: Monoid<A>) => (as: readonly A[]) => A | ||
export declare const fold: <A>(M: Monoid<A>) => (as: ReadonlyArray<A>) => A | ||
/** | ||
@@ -218,0 +216,0 @@ * Use [`MonoidAll`](./boolean.ts.html#monoidall) instead. |
@@ -97,3 +97,3 @@ /** | ||
*/ | ||
export declare const sortBy: <B>(ords: Ord<B>[]) => <A extends B>(as: NonEmptyArray<A>) => NonEmptyArray<A> | ||
export declare const sortBy: <B>(ords: Array<Ord<B>>) => <A extends B>(as: NonEmptyArray<A>) => NonEmptyArray<A> | ||
/** | ||
@@ -126,3 +126,3 @@ * @since 2.11.0 | ||
*/ | ||
export declare const fromArray: <A>(as: A[]) => Option<NonEmptyArray<A>> | ||
export declare const fromArray: <A>(as: Array<A>) => Option<NonEmptyArray<A>> | ||
/** | ||
@@ -158,3 +158,3 @@ * Return a `NonEmptyArray` of length `n` with element `i` initialized with `f(i)`. | ||
*/ | ||
export declare const replicate: <A>(a: A) => (n: number) => RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const replicate: <A>(a: A) => (n: number) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -182,3 +182,3 @@ * Create a `NonEmptyArray` containing a range of integers, including both endpoints. | ||
*/ | ||
export declare const unprepend: <A>(as: NonEmptyArray<A>) => [A, A[]] | ||
export declare const unprepend: <A>(as: NonEmptyArray<A>) => [A, Array<A>] | ||
/** | ||
@@ -194,3 +194,3 @@ * Return the tuple of the `init` and the `last`. | ||
*/ | ||
export declare const unappend: <A>(as: NonEmptyArray<A>) => [A[], A] | ||
export declare const unappend: <A>(as: NonEmptyArray<A>) => [Array<A>, A] | ||
/** | ||
@@ -247,3 +247,3 @@ * @since 2.11.0 | ||
*/ | ||
export declare const groupBy: <A>(f: (a: A) => string) => (as: A[]) => Record<string, NonEmptyArray<A>> | ||
export declare const groupBy: <A>(f: (a: A) => string) => (as: Array<A>) => Record<string, NonEmptyArray<A>> | ||
/** | ||
@@ -256,3 +256,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const insertAt: <A>(i: number, a: A) => (as: A[]) => Option<NonEmptyArray<A>> | ||
export declare const insertAt: <A>(i: number, a: A) => (as: Array<A>) => Option<NonEmptyArray<A>> | ||
/** | ||
@@ -336,3 +336,5 @@ * @since 2.0.0 | ||
*/ | ||
export declare const chop: <A, B>(f: (as: NonEmptyArray<A>) => [B, A[]]) => (as: NonEmptyArray<A>) => NonEmptyArray<B> | ||
export declare const chop: <A, B>( | ||
f: (as: NonEmptyArray<A>) => [B, Array<A>] | ||
) => (as: NonEmptyArray<A>) => NonEmptyArray<B> | ||
/** | ||
@@ -343,3 +345,3 @@ * Splits a `NonEmptyArray` into two pieces, the first piece has max `n` elements. | ||
*/ | ||
export declare const splitAt: (n: number) => <A>(as: NonEmptyArray<A>) => [NonEmptyArray<A>, A[]] | ||
export declare const splitAt: (n: number) => <A>(as: NonEmptyArray<A>) => [NonEmptyArray<A>, Array<A>] | ||
/** | ||
@@ -369,3 +371,3 @@ * @since 2.10.0 | ||
*/ | ||
export declare const altW: <B>(that: LazyArg<NonEmptyArray<B>>) => <A>(as: NonEmptyArray<A>) => NonEmptyArray<B | A> | ||
export declare const altW: <B>(that: LazyArg<NonEmptyArray<B>>) => <A>(as: NonEmptyArray<A>) => NonEmptyArray<A | B> | ||
/** | ||
@@ -510,3 +512,3 @@ * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to | ||
*/ | ||
export declare const getSemigroup: <A = never>() => Se.Semigroup<NonEmptyArray<A>> | ||
export declare const getSemigroup: <A = never>() => Semigroup<NonEmptyArray<A>> | ||
/** | ||
@@ -528,3 +530,3 @@ * @example | ||
*/ | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Se.Semigroup<NonEmptyArray<A>> | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Semigroup<NonEmptyArray<A>> | ||
/** | ||
@@ -539,3 +541,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: NonEmptyArray<(a: A) => B>) => NonEmptyArray<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'NonEmptyArray', (a: A) => B>) => import('./HKT').Kind<'NonEmptyArray', B> | ||
/** | ||
@@ -561,3 +565,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: NonEmptyArray<B>) => <A>(first: NonEmptyArray<A>) => NonEmptyArray<A> | ||
export declare const apFirst: <B>( | ||
second: NonEmptyArray<B> | ||
) => <A>(first: import('./HKT').Kind<'NonEmptyArray', A>) => import('./HKT').Kind<'NonEmptyArray', A> | ||
/** | ||
@@ -568,3 +574,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: NonEmptyArray<B>) => <A>(first: NonEmptyArray<A>) => NonEmptyArray<B> | ||
export declare const apSecond: <B>( | ||
second: NonEmptyArray<B> | ||
) => <A>(first: import('./HKT').Kind<'NonEmptyArray', A>) => import('./HKT').Kind<'NonEmptyArray', B> | ||
/** | ||
@@ -634,7 +642,11 @@ * @category instances | ||
name: N | ||
) => <A>(fa: NonEmptyArray<A>) => NonEmptyArray<{ readonly [K in N]: A }> | ||
) => <A>( | ||
fa: import('./HKT').Kind<'NonEmptyArray', A> | ||
) => import('./HKT').Kind<'NonEmptyArray', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: NonEmptyArray<A>) => NonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'NonEmptyArray', A> | ||
) => import('./HKT').Kind<'NonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -653,4 +665,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => NonEmptyArray<B> | ||
) => (ma: NonEmptyArray<A>) => NonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'NonEmptyArray', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'NonEmptyArray', A> | ||
) => import('./HKT').Kind<'NonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -663,3 +677,5 @@ * @category do notation | ||
fb: NonEmptyArray<B> | ||
) => (fa: NonEmptyArray<A>) => NonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'NonEmptyArray', A> | ||
) => import('./HKT').Kind<'NonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -672,3 +688,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const tail: <A>(as: NonEmptyArray<A>) => A[] | ||
export declare const tail: <A>(as: NonEmptyArray<A>) => Array<A> | ||
/** | ||
@@ -689,3 +705,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const init: <A>(as: NonEmptyArray<A>) => A[] | ||
export declare const init: <A>(as: NonEmptyArray<A>) => Array<A> | ||
/** | ||
@@ -702,3 +718,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const concatAll: <A>(S: Se.Semigroup<A>) => (as: NonEmptyArray<A>) => A | ||
export declare const concatAll: <A>(S: Semigroup<A>) => (as: NonEmptyArray<A>) => A | ||
/** | ||
@@ -710,3 +726,3 @@ * Break an `Array` into its first element and remaining elements. | ||
*/ | ||
export declare const matchLeft: <A, B>(f: (head: A, tail: A[]) => B) => (as: NonEmptyArray<A>) => B | ||
export declare const matchLeft: <A, B>(f: (head: A, tail: Array<A>) => B) => (as: NonEmptyArray<A>) => B | ||
/** | ||
@@ -718,3 +734,3 @@ * Break an `Array` into its initial elements and the last element. | ||
*/ | ||
export declare const matchRight: <A, B>(f: (init: A[], last: A) => B) => (as: NonEmptyArray<A>) => B | ||
export declare const matchRight: <A, B>(f: (init: Array<A>, last: A) => B) => (as: NonEmptyArray<A>) => B | ||
/** | ||
@@ -831,3 +847,3 @@ * Apply a function to the head, creating a new `NonEmptyArray`. | ||
*/ | ||
export declare const snoc: <A>(init: A[], end: A) => NonEmptyArray<A> | ||
export declare const snoc: <A>(init: Array<A>, end: A) => NonEmptyArray<A> | ||
/** | ||
@@ -834,0 +850,0 @@ * Use [`prependAll`](#prependall) instead. |
@@ -400,3 +400,3 @@ /** | ||
*/ | ||
export declare const guard: (b: boolean) => Option<void> | ||
export declare const guard: (b: boolean) => import('./HKT').Kind<'Option', void> | ||
/** | ||
@@ -604,3 +604,3 @@ * @category instances | ||
*/ | ||
export declare const getOrElseW: <B>(onNone: LazyArg<B>) => <A>(ma: Option<A>) => B | A | ||
export declare const getOrElseW: <B>(onNone: LazyArg<B>) => <A>(ma: Option<A>) => A | B | ||
/** | ||
@@ -636,3 +636,5 @@ * Extracts the value out of the structure, if it exists. Otherwise returns the given default value | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Option<(a: A) => B>) => Option<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'Option', (a: A) => B>) => import('./HKT').Kind<'Option', B> | ||
/** | ||
@@ -643,3 +645,5 @@ * Combine two effectful actions, keeping only the result of the first. | ||
*/ | ||
export declare const apFirst: <B>(second: Option<B>) => <A>(first: Option<A>) => Option<A> | ||
export declare const apFirst: <B>( | ||
second: Option<B> | ||
) => <A>(first: import('./HKT').Kind<'Option', A>) => import('./HKT').Kind<'Option', A> | ||
/** | ||
@@ -650,3 +654,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: Option<B>) => <A>(first: Option<A>) => Option<B> | ||
export declare const apSecond: <B>( | ||
second: Option<B> | ||
) => <A>(first: import('./HKT').Kind<'Option', A>) => import('./HKT').Kind<'Option', B> | ||
/** | ||
@@ -757,3 +763,3 @@ * @category sequencing | ||
*/ | ||
export declare const tryCatchK: <A extends readonly unknown[], B>(f: (...a: A) => B) => (...a: A) => Option<B> | ||
export declare const tryCatchK: <A extends ReadonlyArray<unknown>, B>(f: (...a: A) => B) => (...a: A) => Option<B> | ||
/** | ||
@@ -939,7 +945,11 @@ * Returns a *smart constructor* from a function that returns a nullable value. | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: Option<A>) => Option<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'Option', A>) => import('./HKT').Kind<'Option', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: Option<A>) => Option<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'Option', A> | ||
) => import('./HKT').Kind<'Option', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -958,4 +968,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Option<B> | ||
) => (ma: Option<A>) => Option<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'Option', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'Option', A> | ||
) => import('./HKT').Kind<'Option', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -968,3 +980,5 @@ * @category do notation | ||
fb: Option<B> | ||
) => (fa: Option<A>) => Option<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'Option', A> | ||
) => import('./HKT').Kind<'Option', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -991,3 +1005,3 @@ * @since 2.11.0 | ||
f: (index: number, a: A) => Option<B> | ||
) => (as: readonly A[]) => Option<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Option<ReadonlyArray<B>> | ||
/** | ||
@@ -1008,3 +1022,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
*/ | ||
export declare const traverseArray: <A, B>(f: (a: A) => Option<B>) => (as: readonly A[]) => Option<readonly B[]> | ||
export declare const traverseArray: <A, B>(f: (a: A) => Option<B>) => (as: ReadonlyArray<A>) => Option<ReadonlyArray<B>> | ||
/** | ||
@@ -1011,0 +1025,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -28,3 +28,3 @@ /** | ||
*/ | ||
export declare const equalsDefault: <A>(compare: (first: A, second: A) => Ordering) => (x: A, y: A) => boolean | ||
export declare const equalsDefault: <A>(compare: Ord<A>['compare']) => Eq<A>['equals'] | ||
/** | ||
@@ -34,3 +34,3 @@ * @category constructors | ||
*/ | ||
export declare const fromCompare: <A>(compare: (first: A, second: A) => Ordering) => Ord<A> | ||
export declare const fromCompare: <A>(compare: Ord<A>['compare']) => Ord<A> | ||
/** | ||
@@ -52,3 +52,5 @@ * Given a tuple of `Ord`s returns an `Ord` for the tuple. | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>(...ords: { [K in keyof A]: Ord<A[K]> }) => Ord<Readonly<A>> | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...ords: { [K in keyof A]: Ord<A[K]> } | ||
) => Ord<Readonly<A>> | ||
/** | ||
@@ -55,0 +57,0 @@ * @since 2.10.0 |
@@ -222,3 +222,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Reader<E, (a: A) => B>) => Reader<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Reader', E, (a: A) => B>) => import('./HKT').Kind2<'Reader', E, B> | ||
/** | ||
@@ -239,3 +241,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: Reader<E, B>) => <A>(first: Reader<E, A>) => Reader<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: Reader<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'Reader', E, A>) => import('./HKT').Kind2<'Reader', E, A> | ||
/** | ||
@@ -254,3 +258,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
*/ | ||
export declare const apSecond: <E, B>(second: Reader<E, B>) => <A>(first: Reader<E, A>) => Reader<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: Reader<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'Reader', E, A>) => import('./HKT').Kind2<'Reader', E, B> | ||
/** | ||
@@ -316,7 +322,9 @@ * Less strict version of [`apSecond`](#apsecond). | ||
name: N | ||
) => <E, A>(fa: Reader<E, A>) => Reader<E, { readonly [K in N]: A }> | ||
) => <E, A>(fa: import('./HKT').Kind2<'Reader', E, A>) => import('./HKT').Kind2<'Reader', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: Reader<E, A>) => Reader<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'Reader', E, A> | ||
) => import('./HKT').Kind2<'Reader', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -335,4 +343,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Reader<E, B> | ||
) => (ma: Reader<E, A>) => Reader<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'Reader', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'Reader', E, A> | ||
) => import('./HKT').Kind2<'Reader', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -365,3 +375,5 @@ * The `W` suffix (short for **W**idening) means that the environment types will be merged. | ||
fb: Reader<E, B> | ||
) => (fa: Reader<E, A>) => Reader<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'Reader', E, A> | ||
) => import('./HKT').Kind2<'Reader', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -405,3 +417,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => Reader<R, B> | ||
) => (as: readonly A[]) => Reader<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Reader<R, ReadonlyArray<B>> | ||
/** | ||
@@ -424,3 +436,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => Reader<R, B> | ||
) => (as: readonly A[]) => Reader<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Reader<R, ReadonlyArray<B>> | ||
/** | ||
@@ -427,0 +439,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -100,5 +100,5 @@ /** | ||
export declare const fold: <R, E, A, B>( | ||
onLeft: (e: E) => R.Reader<R, B>, | ||
onRight: (a: A) => R.Reader<R, B> | ||
) => (ma: ReaderEither<R, E, A>) => R.Reader<R, B> | ||
onLeft: (e: E) => Reader<R, B>, | ||
onRight: (a: A) => Reader<R, B> | ||
) => (ma: ReaderEither<R, E, A>) => Reader<R, B> | ||
/** | ||
@@ -123,5 +123,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, R2, B, A, R3, C>( | ||
onLeft: (e: E) => R.Reader<R2, B>, | ||
onRight: (a: A) => R.Reader<R3, C> | ||
) => <R1>(ma: ReaderEither<R1, E, A>) => R.Reader<R1 & R2 & R3, B | C> | ||
onLeft: (e: E) => Reader<R2, B>, | ||
onRight: (a: A) => Reader<R3, C> | ||
) => <R1>(ma: ReaderEither<R1, E, A>) => Reader<R1 & R2 & R3, B | C> | ||
/** | ||
@@ -384,3 +384,3 @@ * @category error handling | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<'ReaderEither', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<URI, E> | ||
/** | ||
@@ -437,3 +437,7 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <R, E, B>(fab: ReaderEither<R, E, (a: A) => B>) => ReaderEither<R, E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <R, E, B>( | ||
fab: import('./HKT').Kind3<'ReaderEither', R, E, (a: A) => B> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, B> | ||
/** | ||
@@ -456,3 +460,3 @@ * @category instances | ||
second: ReaderEither<R, E, B> | ||
) => <A>(first: ReaderEither<R, E, A>) => ReaderEither<R, E, A> | ||
) => <A>(first: import('./HKT').Kind3<'ReaderEither', R, E, A>) => import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
/** | ||
@@ -475,3 +479,3 @@ * Less strict version of [`apFirst`](#apfirst) | ||
second: ReaderEither<R, E, B> | ||
) => <A>(first: ReaderEither<R, E, A>) => ReaderEither<R, E, B> | ||
) => <A>(first: import('./HKT').Kind3<'ReaderEither', R, E, A>) => import('./HKT').Kind3<'ReaderEither', R, E, B> | ||
/** | ||
@@ -839,3 +843,5 @@ * Less strict version of [`apSecond`](#apsecond) | ||
name: N | ||
) => <R, E, A>(fa: ReaderEither<R, E, A>) => ReaderEither<R, E, { readonly [K in N]: A }> | ||
) => <R, E, A>( | ||
fa: import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
@@ -845,4 +851,4 @@ name: Exclude<N, keyof A>, | ||
) => <R, E>( | ||
fa: ReaderEither<R, E, A> | ||
) => ReaderEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -861,4 +867,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReaderEither<R, E, B> | ||
) => (ma: ReaderEither<R, E, A>) => ReaderEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind3<'ReaderEither', R, E, B> | ||
) => ( | ||
ma: import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -889,3 +897,5 @@ * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. | ||
fb: ReaderEither<R, E, B> | ||
) => (fa: ReaderEither<R, E, A>) => ReaderEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -932,3 +942,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => ReaderEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -951,3 +961,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => ReaderEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -954,0 +964,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -148,3 +148,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: ReaderIO<E, (a: A) => B>) => ReaderIO<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'ReaderIO', E, (a: A) => B>) => import('./HKT').Kind2<'ReaderIO', E, B> | ||
/** | ||
@@ -165,3 +167,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: ReaderIO<E, B>) => <A>(first: ReaderIO<E, A>) => ReaderIO<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: ReaderIO<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'ReaderIO', E, A>) => import('./HKT').Kind2<'ReaderIO', E, A> | ||
/** | ||
@@ -172,3 +176,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <E, B>(second: ReaderIO<E, B>) => <A>(first: ReaderIO<E, A>) => ReaderIO<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: ReaderIO<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'ReaderIO', E, A>) => import('./HKT').Kind2<'ReaderIO', E, B> | ||
/** | ||
@@ -297,3 +303,3 @@ * @category instances | ||
*/ | ||
export declare const ask: <R>() => ReaderIO<R, R> | ||
export declare const ask: <R>() => import('./HKT').Kind2<'ReaderIO', R, R> | ||
/** | ||
@@ -305,3 +311,3 @@ * Projects a value from the global context in a `ReaderIO`. | ||
*/ | ||
export declare const asks: <R, A>(f: (r: R) => A) => ReaderIO<R, A> | ||
export declare const asks: <R, A>(f: (r: R) => A) => import('./HKT').Kind2<'ReaderIO', R, A> | ||
/** | ||
@@ -365,3 +371,5 @@ * @category lifting | ||
name: N | ||
) => <E, A>(fa: ReaderIO<E, A>) => ReaderIO<E, { readonly [K in N]: A }> | ||
) => <E, A>( | ||
fa: import('./HKT').Kind2<'ReaderIO', E, A> | ||
) => import('./HKT').Kind2<'ReaderIO', E, { readonly [K in N]: A }> | ||
/** | ||
@@ -373,4 +381,6 @@ * @category do notation | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReaderIO<E, B> | ||
) => (ma: ReaderIO<E, A>) => ReaderIO<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'ReaderIO', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'ReaderIO', E, A> | ||
) => import('./HKT').Kind2<'ReaderIO', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -398,3 +408,5 @@ * The `W` suffix (short for **W**idening) means that the environment types will be merged. | ||
fb: ReaderIO<E, B> | ||
) => (fa: ReaderIO<E, A>) => ReaderIO<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'ReaderIO', E, A> | ||
) => import('./HKT').Kind2<'ReaderIO', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -438,3 +450,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => ReaderIO<R, B> | ||
) => (as: readonly A[]) => ReaderIO<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderIO<R, ReadonlyArray<B>> | ||
/** | ||
@@ -457,3 +469,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => ReaderIO<R, B> | ||
) => (as: readonly A[]) => ReaderIO<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderIO<R, ReadonlyArray<B>> | ||
/** | ||
@@ -460,0 +472,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -164,3 +164,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: ReaderTask<E, (a: A) => B>) => ReaderTask<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'ReaderTask', E, (a: A) => B>) => import('./HKT').Kind2<'ReaderTask', E, B> | ||
/** | ||
@@ -183,3 +185,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: ReaderTask<E, B>) => <A>(first: ReaderTask<E, A>) => ReaderTask<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: ReaderTask<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'ReaderTask', E, A>) => import('./HKT').Kind2<'ReaderTask', E, A> | ||
/** | ||
@@ -190,3 +194,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <E, B>(second: ReaderTask<E, B>) => <A>(first: ReaderTask<E, A>) => ReaderTask<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: ReaderTask<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'ReaderTask', E, A>) => import('./HKT').Kind2<'ReaderTask', E, B> | ||
/** | ||
@@ -395,3 +401,3 @@ * Runs computations in parallel. | ||
*/ | ||
export declare const ask: <R>() => ReaderTask<R, R> | ||
export declare const ask: <R>() => import('./HKT').Kind2<'ReaderTask', R, R> | ||
/** | ||
@@ -403,3 +409,3 @@ * Projects a value from the global context in a `ReaderTask`. | ||
*/ | ||
export declare const asks: <R, A>(f: (r: R) => A) => ReaderTask<R, A> | ||
export declare const asks: <R, A>(f: (r: R) => A) => import('./HKT').Kind2<'ReaderTask', R, A> | ||
/** | ||
@@ -458,4 +464,4 @@ * @category lifting | ||
*/ | ||
export declare const fromReaderIOK: <A extends readonly unknown[], R, B>( | ||
f: (...a: A) => RIO.ReaderIO<R, B> | ||
export declare const fromReaderIOK: <A extends ReadonlyArray<unknown>, R, B>( | ||
f: (...a: A) => ReaderIO<R, B> | ||
) => (...a: A) => ReaderTask<R, B> | ||
@@ -533,7 +539,11 @@ /** | ||
name: N | ||
) => <E, A>(fa: ReaderTask<E, A>) => ReaderTask<E, { readonly [K in N]: A }> | ||
) => <E, A>( | ||
fa: import('./HKT').Kind2<'ReaderTask', E, A> | ||
) => import('./HKT').Kind2<'ReaderTask', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: ReaderTask<E, A>) => ReaderTask<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'ReaderTask', E, A> | ||
) => import('./HKT').Kind2<'ReaderTask', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -552,4 +562,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReaderTask<E, B> | ||
) => (ma: ReaderTask<E, A>) => ReaderTask<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'ReaderTask', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'ReaderTask', E, A> | ||
) => import('./HKT').Kind2<'ReaderTask', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -577,3 +589,5 @@ * The `W` suffix (short for **W**idening) means that the environment types will be merged. | ||
fb: ReaderTask<E, B> | ||
) => (fa: ReaderTask<E, A>) => ReaderTask<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'ReaderTask', E, A> | ||
) => import('./HKT').Kind2<'ReaderTask', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -617,3 +631,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => ReaderTask<R, B> | ||
) => (as: readonly A[]) => ReaderTask<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTask<R, ReadonlyArray<B>> | ||
/** | ||
@@ -636,3 +650,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => ReaderTask<R, B> | ||
) => (as: readonly A[]) => ReaderTask<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTask<R, ReadonlyArray<B>> | ||
/** | ||
@@ -655,3 +669,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => ReaderTask<R, B> | ||
) => (as: readonly A[]) => ReaderTask<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTask<R, ReadonlyArray<B>> | ||
/** | ||
@@ -681,3 +695,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
f: (a: A) => ReaderTask<R, B> | ||
) => (as: readonly A[]) => ReaderTask<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTask<R, ReadonlyArray<B>> | ||
/** | ||
@@ -684,0 +698,0 @@ * Alias of `flatMap`. |
@@ -182,5 +182,5 @@ /** | ||
export declare const fold: <R, E, A, B>( | ||
onLeft: (e: E) => RT.ReaderTask<R, B>, | ||
onRight: (a: A) => RT.ReaderTask<R, B> | ||
) => (ma: ReaderTaskEither<R, E, A>) => RT.ReaderTask<R, B> | ||
onLeft: (e: E) => ReaderTask<R, B>, | ||
onRight: (a: A) => ReaderTask<R, B> | ||
) => (ma: ReaderTaskEither<R, E, A>) => ReaderTask<R, B> | ||
/** | ||
@@ -205,5 +205,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, R2, B, A, R3, C>( | ||
onLeft: (e: E) => RT.ReaderTask<R2, B>, | ||
onRight: (a: A) => RT.ReaderTask<R3, C> | ||
) => <R1>(ma: ReaderTaskEither<R1, E, A>) => RT.ReaderTask<R1 & R2 & R3, B | C> | ||
onLeft: (e: E) => ReaderTask<R2, B>, | ||
onRight: (a: A) => ReaderTask<R3, C> | ||
) => <R1>(ma: ReaderTaskEither<R1, E, A>) => ReaderTask<R1 & R2 & R3, B | C> | ||
/** | ||
@@ -343,3 +343,3 @@ * @category error handling | ||
*/ | ||
export declare const fromIOEitherK: <E, A extends readonly unknown[], B>( | ||
export declare const fromIOEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => IOEither<E, B> | ||
@@ -351,4 +351,4 @@ ) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, B> | ||
*/ | ||
export declare const fromTaskEitherK: <E, A extends readonly unknown[], B>( | ||
f: (...a: A) => TE.TaskEither<E, B> | ||
export declare const fromTaskEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => TaskEither<E, B> | ||
) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, B> | ||
@@ -359,3 +359,3 @@ /** | ||
*/ | ||
export declare const fromReaderEitherK: <R, E, A extends readonly unknown[], B>( | ||
export declare const fromReaderEitherK: <R, E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => ReaderEither<R, E, B> | ||
@@ -534,3 +534,3 @@ ) => (...a: A) => ReaderTaskEither<R, E, B> | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<'ReaderTaskEither', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<URI, E> | ||
/** | ||
@@ -587,3 +587,7 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <R, E, B>(fab: ReaderTaskEither<R, E, (a: A) => B>) => ReaderTaskEither<R, E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <R, E, B>( | ||
fab: import('./HKT').Kind3<'ReaderTaskEither', R, E, (a: A) => B> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, B> | ||
/** | ||
@@ -608,3 +612,5 @@ * @category instances | ||
second: ReaderTaskEither<R, E, B> | ||
) => <A>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A> | ||
) => <A>( | ||
first: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
/** | ||
@@ -627,3 +633,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
second: ReaderTaskEither<R, E, B> | ||
) => <A>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B> | ||
) => <A>( | ||
first: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, B> | ||
/** | ||
@@ -973,4 +981,4 @@ * Less strict version of [`apSecond`](#apsecond). | ||
*/ | ||
export declare const fromReaderTaskK: <A extends readonly unknown[], R, B>( | ||
f: (...a: A) => RT.ReaderTask<R, B> | ||
export declare const fromReaderTaskK: <A extends ReadonlyArray<unknown>, R, B>( | ||
f: (...a: A) => ReaderTask<R, B> | ||
) => <E = never>(...a: A) => ReaderTaskEither<R, E, B> | ||
@@ -1003,4 +1011,4 @@ /** | ||
*/ | ||
export declare const fromReaderIOK: <A extends readonly unknown[], R, B>( | ||
f: (...a: A) => RIO.ReaderIO<R, B> | ||
export declare const fromReaderIOK: <A extends ReadonlyArray<unknown>, R, B>( | ||
f: (...a: A) => ReaderIO<R, B> | ||
) => <E = never>(...a: A) => ReaderTaskEither<R, E, B> | ||
@@ -1492,3 +1500,5 @@ /** | ||
name: N | ||
) => <R, E, A>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, { readonly [K in N]: A }> | ||
) => <R, E, A>( | ||
fa: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
@@ -1498,4 +1508,4 @@ name: Exclude<N, keyof A>, | ||
) => <R, E>( | ||
fa: ReaderTaskEither<R, E, A> | ||
) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -1514,6 +1524,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReaderTaskEither<R, E, B> | ||
f: (a: A) => import('./HKT').Kind3<'ReaderTaskEither', R, E, B> | ||
) => ( | ||
ma: ReaderTaskEither<R, E, A> | ||
) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
ma: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1545,4 +1555,4 @@ * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. | ||
) => ( | ||
fa: ReaderTaskEither<R, E, A> | ||
) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1589,3 +1599,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => ReaderTaskEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1608,3 +1618,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => ReaderTaskEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1627,3 +1637,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => ReaderTaskEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1655,3 +1665,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
f: (a: A) => ReaderTaskEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1658,0 +1668,0 @@ * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. |
@@ -51,3 +51,3 @@ /** | ||
*/ | ||
export declare const isEmpty: <A>(as: readonly A[]) => as is readonly [] | ||
export declare const isEmpty: <A>(as: ReadonlyArray<A>) => as is readonly [] | ||
/** | ||
@@ -71,3 +71,3 @@ * Test whether a `ReadonlyArray` is non empty. | ||
*/ | ||
export declare const prepend: <A>(head: A) => (tail: readonly A[]) => RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const prepend: <A>(head: A) => (tail: ReadonlyArray<A>) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -78,3 +78,3 @@ * Less strict version of [`prepend`](#prepend). | ||
*/ | ||
export declare const prependW: <B>(head: B) => <A>(tail: readonly A[]) => RNEA.ReadonlyNonEmptyArray<B | A> | ||
export declare const prependW: <B>(head: B) => <A>(tail: ReadonlyArray<A>) => ReadonlyNonEmptyArray<A | B> | ||
/** | ||
@@ -91,3 +91,3 @@ * Append an element to the end of a `ReadonlyArray`, creating a new `ReadonlyNonEmptyArray`. | ||
*/ | ||
export declare const append: <A>(end: A) => (init: readonly A[]) => RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const append: <A>(end: A) => (init: ReadonlyArray<A>) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -98,3 +98,3 @@ * Less strict version of [`append`](#append). | ||
*/ | ||
export declare const appendW: <B>(end: B) => <A>(init: readonly A[]) => RNEA.ReadonlyNonEmptyArray<B | A> | ||
export declare const appendW: <B>(end: B) => <A>(init: ReadonlyArray<A>) => ReadonlyNonEmptyArray<A | B> | ||
/** | ||
@@ -114,3 +114,3 @@ * Return a `ReadonlyArray` of length `n` with element `i` initialized with `f(i)`. | ||
*/ | ||
export declare const makeBy: <A>(n: number, f: (i: number) => A) => readonly A[] | ||
export declare const makeBy: <A>(n: number, f: (i: number) => A) => ReadonlyArray<A> | ||
/** | ||
@@ -129,3 +129,3 @@ * Create a `ReadonlyArray` containing a value repeated the specified number of times. | ||
*/ | ||
export declare const replicate: <A>(n: number, a: A) => readonly A[] | ||
export declare const replicate: <A>(n: number, a: A) => ReadonlyArray<A> | ||
/** | ||
@@ -160,4 +160,4 @@ * @category lifting | ||
onEmpty: LazyArg<B>, | ||
onNonEmpty: (as: RNEA.ReadonlyNonEmptyArray<A>) => C | ||
) => (as: readonly A[]) => B | C | ||
onNonEmpty: (as: ReadonlyNonEmptyArray<A>) => C | ||
) => (as: ReadonlyArray<A>) => B | C | ||
/** | ||
@@ -179,4 +179,4 @@ * @category pattern matching | ||
onEmpty: LazyArg<B>, | ||
onNonEmpty: (head: A, tail: readonly A[]) => C | ||
) => (as: readonly A[]) => B | C | ||
onNonEmpty: (head: A, tail: ReadonlyArray<A>) => C | ||
) => (as: ReadonlyArray<A>) => B | C | ||
/** | ||
@@ -216,4 +216,4 @@ * Break a `ReadonlyArray` into its first element and remaining elements. | ||
onEmpty: LazyArg<B>, | ||
onNonEmpty: (init: readonly A[], last: A) => C | ||
) => (as: readonly A[]) => B | C | ||
onNonEmpty: (init: ReadonlyArray<A>, last: A) => C | ||
) => (as: ReadonlyArray<A>) => B | C | ||
/** | ||
@@ -243,3 +243,5 @@ * Break a `ReadonlyArray` into its initial elements and the last element. | ||
*/ | ||
export declare const chainWithIndex: <A, B>(f: (i: number, a: A) => readonly B[]) => (as: readonly A[]) => readonly B[] | ||
export declare const chainWithIndex: <A, B>( | ||
f: (i: number, a: A) => ReadonlyArray<B> | ||
) => (as: ReadonlyArray<A>) => ReadonlyArray<B> | ||
/** | ||
@@ -255,3 +257,3 @@ * Same as `reduce` but it carries over the intermediate steps. | ||
*/ | ||
export declare const scanLeft: <A, B>(b: B, f: (b: B, a: A) => B) => (as: readonly A[]) => RNEA.ReadonlyNonEmptyArray<B> | ||
export declare const scanLeft: <A, B>(b: B, f: (b: B, a: A) => B) => (as: ReadonlyArray<A>) => ReadonlyNonEmptyArray<B> | ||
/** | ||
@@ -267,6 +269,3 @@ * Fold an array from the right, keeping all intermediate results instead of only the final result | ||
*/ | ||
export declare const scanRight: <A, B>( | ||
b: B, | ||
f: (a: A, b: B) => B | ||
) => (as: readonly A[]) => RNEA.ReadonlyNonEmptyArray<B> | ||
export declare const scanRight: <A, B>(b: B, f: (a: A, b: B) => B) => (as: ReadonlyArray<A>) => ReadonlyNonEmptyArray<B> | ||
/** | ||
@@ -277,3 +276,3 @@ * Calculate the number of elements in a `ReadonlyArray`. | ||
*/ | ||
export declare const size: <A>(as: readonly A[]) => number | ||
export declare const size: <A>(as: ReadonlyArray<A>) => number | ||
/** | ||
@@ -312,3 +311,3 @@ * Test whether an array contains a particular index | ||
*/ | ||
export declare const head: <A>(as: readonly A[]) => Option<A> | ||
export declare const head: <A>(as: ReadonlyArray<A>) => Option<A> | ||
/** | ||
@@ -326,3 +325,3 @@ * Get the last element in an array, or `None` if the array is empty | ||
*/ | ||
export declare const last: <A>(as: readonly A[]) => Option<A> | ||
export declare const last: <A>(as: ReadonlyArray<A>) => Option<A> | ||
/** | ||
@@ -340,3 +339,3 @@ * Get all but the first element of an array, creating a new array, or `None` if the array is empty | ||
*/ | ||
export declare const tail: <A>(as: readonly A[]) => Option<readonly A[]> | ||
export declare const tail: <A>(as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -354,3 +353,3 @@ * Get all but the last element of an array, creating a new array, or `None` if the array is empty | ||
*/ | ||
export declare const init: <A>(as: readonly A[]) => Option<readonly A[]> | ||
export declare const init: <A>(as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -374,3 +373,3 @@ * Keep only a max number of elements from the start of an `ReadonlyArray`, creating a new `ReadonlyArray`. | ||
*/ | ||
export declare const takeLeft: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const takeLeft: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -394,3 +393,3 @@ * Keep only a max number of elements from the end of an `ReadonlyArray`, creating a new `ReadonlyArray`. | ||
*/ | ||
export declare const takeRight: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const takeRight: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -451,3 +450,3 @@ * Calculate the longest initial subarray for which all element satisfy the specified predicate, creating a new array | ||
*/ | ||
export declare const dropLeft: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const dropLeft: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -469,3 +468,3 @@ * Drop a max number of elements from the end of an `ReadonlyArray`, creating a new `ReadonlyArray`. | ||
*/ | ||
export declare const dropRight: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const dropRight: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -500,3 +499,3 @@ * Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new array | ||
*/ | ||
export declare const findIndex: <A>(predicate: Predicate<A>) => (as: readonly A[]) => Option<number> | ||
export declare const findIndex: <A>(predicate: Predicate<A>) => (as: ReadonlyArray<A>) => Option<number> | ||
/** | ||
@@ -540,3 +539,3 @@ * Find the first element which satisfies a predicate (or a refinement) function | ||
*/ | ||
export declare const findFirstMap: <A, B>(f: (a: A) => Option<B>) => (as: readonly A[]) => Option<B> | ||
export declare const findFirstMap: <A, B>(f: (a: A) => Option<B>) => (as: ReadonlyArray<A>) => Option<B> | ||
/** | ||
@@ -580,3 +579,3 @@ * Find the last element which satisfies a predicate function | ||
*/ | ||
export declare const findLastMap: <A, B>(f: (a: A) => Option<B>) => (as: readonly A[]) => Option<B> | ||
export declare const findLastMap: <A, B>(f: (a: A) => Option<B>) => (as: ReadonlyArray<A>) => Option<B> | ||
/** | ||
@@ -600,3 +599,3 @@ * Returns the index of the last element of the list which matches the predicate | ||
*/ | ||
export declare const findLastIndex: <A>(predicate: Predicate<A>) => (as: readonly A[]) => Option<number> | ||
export declare const findLastIndex: <A>(predicate: Predicate<A>) => (as: ReadonlyArray<A>) => Option<number> | ||
/** | ||
@@ -613,3 +612,3 @@ * Insert an element at the specified index, creating a new array, or returning `None` if the index is out of bounds | ||
*/ | ||
export declare const insertAt: <A>(i: number, a: A) => (as: readonly A[]) => Option<RNEA.ReadonlyNonEmptyArray<A>> | ||
export declare const insertAt: <A>(i: number, a: A) => (as: ReadonlyArray<A>) => Option<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -627,3 +626,3 @@ * Change the element at the specified index, creating a new array, or returning `None` if the index is out of bounds | ||
*/ | ||
export declare const updateAt: <A>(i: number, a: A) => (as: readonly A[]) => Option<readonly A[]> | ||
export declare const updateAt: <A>(i: number, a: A) => (as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -641,3 +640,3 @@ * Delete the element at the specified index, creating a new array, or returning `None` if the index is out of bounds | ||
*/ | ||
export declare const deleteAt: (i: number) => <A>(as: readonly A[]) => Option<readonly A[]> | ||
export declare const deleteAt: (i: number) => <A>(as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -657,3 +656,3 @@ * Apply a function to the element at the specified index, creating a new array, or returning `None` if the index is out | ||
*/ | ||
export declare const modifyAt: <A>(i: number, f: (a: A) => A) => (as: readonly A[]) => Option<readonly A[]> | ||
export declare const modifyAt: <A>(i: number, f: (a: A) => A) => (as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -669,3 +668,3 @@ * Reverse an array, creating a new array | ||
*/ | ||
export declare const reverse: <A>(as: readonly A[]) => readonly A[] | ||
export declare const reverse: <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -682,3 +681,3 @@ * Extracts from an array of `Either` all the `Right` elements. All the `Right` elements are extracted in order | ||
*/ | ||
export declare const rights: <E, A>(as: readonly Either<E, A>[]) => readonly A[] | ||
export declare const rights: <E, A>(as: ReadonlyArray<Either<E, A>>) => ReadonlyArray<A> | ||
/** | ||
@@ -695,3 +694,3 @@ * Extracts from an array of `Either` all the `Left` elements. All the `Left` elements are extracted in order | ||
*/ | ||
export declare const lefts: <E, A>(as: readonly Either<E, A>[]) => readonly E[] | ||
export declare const lefts: <E, A>(as: ReadonlyArray<Either<E, A>>) => ReadonlyArray<E> | ||
/** | ||
@@ -708,3 +707,3 @@ * Sort the elements of an array in increasing order, creating a new array | ||
*/ | ||
export declare const sort: <B>(O: Ord<B>) => <A extends B>(as: readonly A[]) => readonly A[] | ||
export declare const sort: <B>(O: Ord<B>) => <A extends B>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -721,3 +720,7 @@ * Apply a function to pairs of elements at the same index in two arrays, collecting the results in a new array. If one | ||
*/ | ||
export declare const zipWith: <A, B, C>(fa: readonly A[], fb: readonly B[], f: (a: A, b: B) => C) => readonly C[] | ||
export declare const zipWith: <A, B, C>( | ||
fa: ReadonlyArray<A>, | ||
fb: ReadonlyArray<B>, | ||
f: (a: A, b: B) => C | ||
) => ReadonlyArray<C> | ||
/** | ||
@@ -747,3 +750,3 @@ * Takes two arrays and returns an array of corresponding pairs. If one input array is short, excess elements of the | ||
*/ | ||
export declare const unzip: <A, B>(as: readonly (readonly [A, B])[]) => readonly [readonly A[], readonly B[]] | ||
export declare const unzip: <A, B>(as: ReadonlyArray<readonly [A, B]>) => readonly [ReadonlyArray<A>, ReadonlyArray<B>] | ||
/** | ||
@@ -759,3 +762,3 @@ * Prepend an element to every member of an array | ||
*/ | ||
export declare const prependAll: <A>(middle: A) => (as: readonly A[]) => readonly A[] | ||
export declare const prependAll: <A>(middle: A) => (as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -771,3 +774,3 @@ * Places an element in between members of an array | ||
*/ | ||
export declare const intersperse: <A>(middle: A) => (as: readonly A[]) => readonly A[] | ||
export declare const intersperse: <A>(middle: A) => (as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -783,3 +786,3 @@ * Rotate a `ReadonlyArray` by `n` steps. | ||
*/ | ||
export declare const rotate: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const rotate: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -815,3 +818,3 @@ * Test if a value is a member of an array. Takes a `Eq<A>` as a single | ||
*/ | ||
export declare const uniq: <A>(E: Eq<A>) => (as: readonly A[]) => readonly A[] | ||
export declare const uniq: <A>(E: Eq<A>) => (as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -847,3 +850,3 @@ * Sort the elements of an array in increasing order, where elements are compared using first `ords[0]`, then `ords[1]`, | ||
*/ | ||
export declare const sortBy: <B>(ords: readonly Ord<B>[]) => <A extends B>(as: readonly A[]) => readonly A[] | ||
export declare const sortBy: <B>(ords: ReadonlyArray<Ord<B>>) => <A extends B>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -871,4 +874,4 @@ * A useful recursion pattern for processing a `ReadonlyArray` to produce a new `ReadonlyArray`, often used for "chopping" up the input | ||
export declare const chop: <A, B>( | ||
f: (as: RNEA.ReadonlyNonEmptyArray<A>) => readonly [B, readonly A[]] | ||
) => (as: readonly A[]) => readonly B[] | ||
f: (as: ReadonlyNonEmptyArray<A>) => readonly [B, ReadonlyArray<A>] | ||
) => (as: ReadonlyArray<A>) => ReadonlyArray<B> | ||
/** | ||
@@ -884,3 +887,3 @@ * Splits a `ReadonlyArray` into two pieces, the first piece has max `n` elements. | ||
*/ | ||
export declare const splitAt: (n: number) => <A>(as: readonly A[]) => readonly [readonly A[], readonly A[]] | ||
export declare const splitAt: (n: number) => <A>(as: ReadonlyArray<A>) => readonly [ReadonlyArray<A>, ReadonlyArray<A>] | ||
/** | ||
@@ -904,3 +907,3 @@ * Splits a `ReadonlyArray` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of | ||
*/ | ||
export declare const chunksOf: (n: number) => <A>(as: readonly A[]) => readonly RNEA.ReadonlyNonEmptyArray<A>[] | ||
export declare const chunksOf: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -910,5 +913,5 @@ * @category lifting | ||
*/ | ||
export declare const fromOptionK: <A extends readonly unknown[], B>( | ||
export declare const fromOptionK: <A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => Option<B> | ||
) => (...a: A) => readonly B[] | ||
) => (...a: A) => ReadonlyArray<B> | ||
/** | ||
@@ -957,3 +960,3 @@ * `ReadonlyArray` comprehension. | ||
*/ | ||
export declare const concatW: <B>(second: readonly B[]) => <A>(first: readonly A[]) => readonly (B | A)[] | ||
export declare const concatW: <B>(second: ReadonlyArray<B>) => <A>(first: ReadonlyArray<A>) => ReadonlyArray<A | B> | ||
/** | ||
@@ -1042,3 +1045,3 @@ * @since 2.11.0 | ||
*/ | ||
export declare const altW: <B>(that: LazyArg<readonly B[]>) => <A>(fa: readonly A[]) => readonly (B | A)[] | ||
export declare const altW: <B>(that: LazyArg<ReadonlyArray<B>>) => <A>(fa: ReadonlyArray<A>) => ReadonlyArray<A | B> | ||
/** | ||
@@ -1121,3 +1124,3 @@ * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to | ||
*/ | ||
export declare const separate: <A, B>(fa: readonly Either<A, B>[]) => Separated<readonly A[], readonly B[]> | ||
export declare const separate: <A, B>(fa: ReadonlyArray<Either<A, B>>) => Separated<ReadonlyArray<A>, ReadonlyArray<B>> | ||
/** | ||
@@ -1136,3 +1139,5 @@ * @category filtering | ||
*/ | ||
export declare const filterMapWithIndex: <A, B>(f: (i: number, a: A) => Option<B>) => (fa: readonly A[]) => readonly B[] | ||
export declare const filterMapWithIndex: <A, B>( | ||
f: (i: number, a: A) => Option<B> | ||
) => (fa: ReadonlyArray<A>) => ReadonlyArray<B> | ||
/** | ||
@@ -1187,3 +1192,3 @@ * @category filtering | ||
f: (i: number, a: A) => Either<B, C> | ||
) => (fa: readonly A[]) => Separated<readonly B[], readonly C[]> | ||
) => (fa: ReadonlyArray<A>) => Separated<ReadonlyArray<B>, ReadonlyArray<C>> | ||
/** | ||
@@ -1210,3 +1215,5 @@ * @category filtering | ||
*/ | ||
export declare const foldMapWithIndex: <M>(M: Monoid<M>) => <A>(f: (i: number, a: A) => M) => (fa: readonly A[]) => M | ||
export declare const foldMapWithIndex: <M>( | ||
M: Monoid<M> | ||
) => <A>(f: (i: number, a: A) => M) => (fa: ReadonlyArray<A>) => M | ||
/** | ||
@@ -1265,3 +1272,3 @@ * @category folding | ||
*/ | ||
export declare const unfold: <A, B>(b: B, f: (b: B) => Option<readonly [A, B]>) => readonly A[] | ||
export declare const unfold: <A, B>(b: B, f: (b: B) => Option<readonly [A, B]>) => ReadonlyArray<A> | ||
/** | ||
@@ -1286,3 +1293,3 @@ * @category type lambdas | ||
*/ | ||
export declare const getShow: <A>(S: Show<A>) => Show<readonly A[]> | ||
export declare const getShow: <A>(S: Show<A>) => Show<ReadonlyArray<A>> | ||
/** | ||
@@ -1292,3 +1299,3 @@ * @category instances | ||
*/ | ||
export declare const getSemigroup: <A = never>() => Semigroup<readonly A[]> | ||
export declare const getSemigroup: <A = never>() => Semigroup<ReadonlyArray<A>> | ||
/** | ||
@@ -1306,3 +1313,3 @@ * Returns a `Monoid` for `ReadonlyArray<A>`. | ||
*/ | ||
export declare const getMonoid: <A = never>() => Monoid<readonly A[]> | ||
export declare const getMonoid: <A = never>() => Monoid<ReadonlyArray<A>> | ||
/** | ||
@@ -1324,3 +1331,3 @@ * Derives an `Eq` over the `ReadonlyArray` of a given element type from the `Eq` of that type. The derived `Eq` defines two | ||
*/ | ||
export declare const getEq: <A>(E: Eq<A>) => Eq<readonly A[]> | ||
export declare const getEq: <A>(E: Eq<A>) => Eq<ReadonlyArray<A>> | ||
/** | ||
@@ -1345,3 +1352,3 @@ * Derives an `Ord` over the `ReadonlyArray` of a given element type from the `Ord` of that type. The ordering between two such | ||
*/ | ||
export declare const getOrd: <A>(O: Ord<A>) => Ord<readonly A[]> | ||
export declare const getOrd: <A>(O: Ord<A>) => Ord<ReadonlyArray<A>> | ||
/** | ||
@@ -1351,3 +1358,3 @@ * @category instances | ||
*/ | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Semigroup<readonly A[]> | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Semigroup<ReadonlyArray<A>> | ||
/** | ||
@@ -1357,3 +1364,3 @@ * @category instances | ||
*/ | ||
export declare const getUnionMonoid: <A>(E: Eq<A>) => Monoid<readonly A[]> | ||
export declare const getUnionMonoid: <A>(E: Eq<A>) => Monoid<ReadonlyArray<A>> | ||
/** | ||
@@ -1363,3 +1370,3 @@ * @category instances | ||
*/ | ||
export declare const getIntersectionSemigroup: <A>(E: Eq<A>) => Semigroup<readonly A[]> | ||
export declare const getIntersectionSemigroup: <A>(E: Eq<A>) => Semigroup<ReadonlyArray<A>> | ||
/** | ||
@@ -1369,3 +1376,3 @@ * @category instances | ||
*/ | ||
export declare const getDifferenceMagma: <A>(E: Eq<A>) => Magma<readonly A[]> | ||
export declare const getDifferenceMagma: <A>(E: Eq<A>) => Magma<ReadonlyArray<A>> | ||
/** | ||
@@ -1380,3 +1387,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: readonly ((a: A) => B)[]) => readonly B[] | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'ReadonlyArray', (a: A) => B>) => import('./HKT').Kind<'ReadonlyArray', B> | ||
/** | ||
@@ -1402,3 +1411,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: readonly B[]) => <A>(first: readonly A[]) => readonly A[] | ||
export declare const apFirst: <B>( | ||
second: readonly B[] | ||
) => <A>(first: import('./HKT').Kind<'ReadonlyArray', A>) => import('./HKT').Kind<'ReadonlyArray', A> | ||
/** | ||
@@ -1409,3 +1420,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: readonly B[]) => <A>(first: readonly A[]) => readonly B[] | ||
export declare const apSecond: <B>( | ||
second: readonly B[] | ||
) => <A>(first: import('./HKT').Kind<'ReadonlyArray', A>) => import('./HKT').Kind<'ReadonlyArray', B> | ||
/** | ||
@@ -1472,3 +1485,3 @@ * @category instances | ||
*/ | ||
export declare const guard: (b: boolean) => readonly void[] | ||
export declare const guard: (b: boolean) => import('./HKT').Kind<'ReadonlyArray', void> | ||
/** | ||
@@ -1523,3 +1536,3 @@ * @category instances | ||
*/ | ||
export declare const chainRecDepthFirst: <A, B>(f: (a: A) => readonly Either<A, B>[]) => (a: A) => readonly B[] | ||
export declare const chainRecDepthFirst: <A, B>(f: (a: A) => ReadonlyArray<Either<A, B>>) => (a: A) => ReadonlyArray<B> | ||
/** | ||
@@ -1534,3 +1547,5 @@ * @category instances | ||
*/ | ||
export declare const chainRecBreadthFirst: <A, B>(f: (a: A) => readonly Either<A, B>[]) => (a: A) => readonly B[] | ||
export declare const chainRecBreadthFirst: <A, B>( | ||
f: (a: A) => ReadonlyArray<Either<A, B>> | ||
) => (a: A) => ReadonlyArray<B> | ||
/** | ||
@@ -1590,3 +1605,3 @@ * @category instances | ||
*/ | ||
export declare const unsafeUpdateAt: <A>(i: number, a: A, as: readonly A[]) => readonly A[] | ||
export declare const unsafeUpdateAt: <A>(i: number, a: A, as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -1596,3 +1611,3 @@ * @category unsafe | ||
*/ | ||
export declare const unsafeDeleteAt: <A>(i: number, as: readonly A[]) => readonly A[] | ||
export declare const unsafeDeleteAt: <A>(i: number, as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -1602,3 +1617,3 @@ * @category conversions | ||
*/ | ||
export declare const toArray: <A>(as: readonly A[]) => A[] | ||
export declare const toArray: <A>(as: ReadonlyArray<A>) => Array<A> | ||
/** | ||
@@ -1608,3 +1623,3 @@ * @category conversions | ||
*/ | ||
export declare const fromArray: <A>(as: A[]) => readonly A[] | ||
export declare const fromArray: <A>(as: Array<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -1648,3 +1663,3 @@ * An empty array | ||
*/ | ||
export declare const some: <A>(predicate: Predicate<A>) => (as: readonly A[]) => as is RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const some: <A>(predicate: Predicate<A>) => (as: ReadonlyArray<A>) => as is ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -1669,3 +1684,3 @@ * Alias of [`some`](#some) | ||
*/ | ||
export declare const intercalate: <A>(M: Monoid<A>) => (middle: A) => (as: readonly A[]) => A | ||
export declare const intercalate: <A>(M: Monoid<A>) => (middle: A) => (as: ReadonlyArray<A>) => A | ||
/** | ||
@@ -1680,7 +1695,13 @@ * @category do notation | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: readonly A[]) => readonly { readonly [K in N]: A }[] | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>( | ||
fa: import('./HKT').Kind<'ReadonlyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyArray', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: readonly A[]) => readonly { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }[] | ||
) => ( | ||
fa: import('./HKT').Kind<'ReadonlyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -1699,4 +1720,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => readonly B[] | ||
) => (ma: readonly A[]) => readonly { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }[] | ||
f: (a: A) => import('./HKT').Kind<'ReadonlyArray', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'ReadonlyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1709,3 +1732,5 @@ * @category do notation | ||
fb: readonly B[] | ||
) => (fa: readonly A[]) => readonly { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }[] | ||
) => ( | ||
fa: import('./HKT').Kind<'ReadonlyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1725,3 +1750,3 @@ * Alias of `flatMap`. | ||
*/ | ||
export declare const range: (start: number, end: number) => RNEA.ReadonlyNonEmptyArray<number> | ||
export declare const range: (start: number, end: number) => ReadonlyNonEmptyArray<number> | ||
/** | ||
@@ -1742,3 +1767,3 @@ * Use [`prepend`](#prepend) instead. | ||
*/ | ||
export declare const snoc: <A>(init: readonly A[], end: A) => RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const snoc: <A>(init: ReadonlyArray<A>, end: A) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -1751,3 +1776,3 @@ * Use [`prependAll`](#prependall) instead. | ||
*/ | ||
export declare const prependToAll: <A>(middle: A) => (as: readonly A[]) => readonly A[] | ||
export declare const prependToAll: <A>(middle: A) => (as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -1754,0 +1779,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -75,3 +75,3 @@ import { Compactable2 } from './Compactable' | ||
*/ | ||
export declare const keys: <K>(O: Ord<K>) => <A>(m: ReadonlyMap<K, A>) => readonly K[] | ||
export declare const keys: <K>(O: Ord<K>) => <A>(m: ReadonlyMap<K, A>) => ReadonlyArray<K> | ||
/** | ||
@@ -82,3 +82,3 @@ * Get a sorted `ReadonlyArray` of the values contained in a `ReadonlyMap`. | ||
*/ | ||
export declare const values: <A>(O: Ord<A>) => <K>(m: ReadonlyMap<K, A>) => readonly A[] | ||
export declare const values: <A>(O: Ord<A>) => <K>(m: ReadonlyMap<K, A>) => ReadonlyArray<A> | ||
/** | ||
@@ -96,3 +96,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const toReadonlyArray: <K>(O: Ord<K>) => <A>(m: ReadonlyMap<K, A>) => readonly (readonly [K, A])[] | ||
export declare const toReadonlyArray: <K>(O: Ord<K>) => <A>(m: ReadonlyMap<K, A>) => ReadonlyArray<readonly [K, A]> | ||
/** | ||
@@ -127,3 +127,3 @@ * Unfolds a map into a list of key/value pairs | ||
*/ | ||
export declare const updateAt: <K>(E: Eq<K>) => <A>(k: K, a: A) => (m: ReadonlyMap<K, A>) => O.Option<ReadonlyMap<K, A>> | ||
export declare const updateAt: <K>(E: Eq<K>) => <A>(k: K, a: A) => (m: ReadonlyMap<K, A>) => Option<ReadonlyMap<K, A>> | ||
/** | ||
@@ -134,3 +134,3 @@ * @since 2.5.0 | ||
E: Eq<K> | ||
) => <A>(k: K, f: (a: A) => A) => (m: ReadonlyMap<K, A>) => O.Option<ReadonlyMap<K, A>> | ||
) => <A>(k: K, f: (a: A) => A) => (m: ReadonlyMap<K, A>) => Option<ReadonlyMap<K, A>> | ||
/** | ||
@@ -245,3 +245,3 @@ * Delete a key and value from a map, returning the value as well as the subsequent map | ||
export declare const filterMapWithIndex: <K, A, B>( | ||
f: (k: K, a: A) => O.Option<B> | ||
f: (k: K, a: A) => Option<B> | ||
) => (fa: ReadonlyMap<K, A>) => ReadonlyMap<K, B> | ||
@@ -264,3 +264,3 @@ /** | ||
*/ | ||
export declare const compact: <K, A>(fa: ReadonlyMap<K, O.Option<A>>) => ReadonlyMap<K, A> | ||
export declare const compact: <K, A>(fa: ReadonlyMap<K, Option<A>>) => ReadonlyMap<K, A> | ||
/** | ||
@@ -369,3 +369,3 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: ReadonlyMap<E, (a: A) => B>) => ReadonlyMap<E, B> | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Kind2<'ReadonlyMap', E, (a: A) => B>) => Kind2<'ReadonlyMap', E, B> | ||
/** | ||
@@ -375,3 +375,3 @@ * @category instances | ||
*/ | ||
export declare const getFunctorWithIndex: <K = never>() => FunctorWithIndex2C<'ReadonlyMap', K, K> | ||
export declare const getFunctorWithIndex: <K = never>() => FunctorWithIndex2C<URI, K, K> | ||
/** | ||
@@ -406,3 +406,3 @@ * @category instances | ||
*/ | ||
export declare const getFoldable: <K>(O: Ord<K>) => Foldable2C<'ReadonlyMap', K> | ||
export declare const getFoldable: <K>(O: Ord<K>) => Foldable2C<URI, K> | ||
/** | ||
@@ -433,3 +433,3 @@ * @category folding | ||
*/ | ||
export declare const getFoldableWithIndex: <K>(O: Ord<K>) => FoldableWithIndex2C<'ReadonlyMap', K, K> | ||
export declare const getFoldableWithIndex: <K>(O: Ord<K>) => FoldableWithIndex2C<URI, K, K> | ||
/** | ||
@@ -439,3 +439,3 @@ * @category traversing | ||
*/ | ||
export declare const getTraversable: <K>(O: Ord<K>) => Traversable2C<'ReadonlyMap', K> | ||
export declare const getTraversable: <K>(O: Ord<K>) => Traversable2C<URI, K> | ||
/** | ||
@@ -445,3 +445,3 @@ * @category traversing | ||
*/ | ||
export declare const getTraversableWithIndex: <K>(O: Ord<K>) => TraversableWithIndex2C<'ReadonlyMap', K, K> | ||
export declare const getTraversableWithIndex: <K>(O: Ord<K>) => TraversableWithIndex2C<URI, K, K> | ||
/** | ||
@@ -448,0 +448,0 @@ * @category filtering |
@@ -97,3 +97,3 @@ /** | ||
export declare const sortBy: <B>( | ||
ords: readonly Ord<B>[] | ||
ords: ReadonlyArray<Ord<B>> | ||
) => <A extends B>(as: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<A> | ||
@@ -124,3 +124,3 @@ /** | ||
*/ | ||
export declare const fromReadonlyArray: <A>(as: readonly A[]) => Option<ReadonlyNonEmptyArray<A>> | ||
export declare const fromReadonlyArray: <A>(as: ReadonlyArray<A>) => Option<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -179,3 +179,3 @@ * Return a `ReadonlyNonEmptyArray` of length `n` with element `i` initialized with `f(i)`. | ||
*/ | ||
export declare const unprepend: <A>(as: ReadonlyNonEmptyArray<A>) => readonly [A, readonly A[]] | ||
export declare const unprepend: <A>(as: ReadonlyNonEmptyArray<A>) => readonly [A, ReadonlyArray<A>] | ||
/** | ||
@@ -191,3 +191,3 @@ * Return the tuple of the `init` and the `last`. | ||
*/ | ||
export declare const unappend: <A>(as: ReadonlyNonEmptyArray<A>) => readonly [readonly A[], A] | ||
export declare const unappend: <A>(as: ReadonlyNonEmptyArray<A>) => readonly [ReadonlyArray<A>, A] | ||
/** | ||
@@ -197,3 +197,3 @@ * @category conversions | ||
*/ | ||
export declare const fromArray: <A>(as: A[]) => Option<ReadonlyNonEmptyArray<A>> | ||
export declare const fromArray: <A>(as: Array<A>) => Option<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -260,3 +260,3 @@ * @since 2.11.0 | ||
f: (a: A) => string | ||
) => (as: readonly A[]) => Readonly<Record<string, ReadonlyNonEmptyArray<A>>> | ||
) => (as: ReadonlyArray<A>) => ReadonlyRecord<string, ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -341,3 +341,3 @@ * @since 2.5.0 | ||
export declare const chop: <A, B>( | ||
f: (as: ReadonlyNonEmptyArray<A>) => readonly [B, readonly A[]] | ||
f: (as: ReadonlyNonEmptyArray<A>) => readonly [B, ReadonlyArray<A>] | ||
) => (as: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<B> | ||
@@ -351,3 +351,3 @@ /** | ||
n: number | ||
) => <A>(as: ReadonlyNonEmptyArray<A>) => readonly [ReadonlyNonEmptyArray<A>, readonly A[]] | ||
) => <A>(as: ReadonlyNonEmptyArray<A>) => readonly [ReadonlyNonEmptyArray<A>, ReadonlyArray<A>] | ||
/** | ||
@@ -389,3 +389,3 @@ * Splits a `ReadonlyNonEmptyArray` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of | ||
that: LazyArg<ReadonlyNonEmptyArray<B>> | ||
) => <A>(as: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<B | A> | ||
) => <A>(as: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<A | B> | ||
/** | ||
@@ -482,3 +482,3 @@ * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to | ||
*/ | ||
export declare const foldMap: <S>(S: Se.Semigroup<S>) => <A>(f: (a: A) => S) => (as: ReadonlyNonEmptyArray<A>) => S | ||
export declare const foldMap: <S>(S: Semigroup<S>) => <A>(f: (a: A) => S) => (as: ReadonlyNonEmptyArray<A>) => S | ||
/** | ||
@@ -504,3 +504,3 @@ * @category folding | ||
export declare const foldMapWithIndex: <S>( | ||
S: Se.Semigroup<S> | ||
S: Semigroup<S> | ||
) => <A>(f: (i: number, a: A) => S) => (as: ReadonlyNonEmptyArray<A>) => S | ||
@@ -561,3 +561,3 @@ /** | ||
*/ | ||
export declare const getSemigroup: <A = never>() => Se.Semigroup<ReadonlyNonEmptyArray<A>> | ||
export declare const getSemigroup: <A = never>() => Semigroup<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -579,3 +579,3 @@ * @example | ||
*/ | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Se.Semigroup<ReadonlyNonEmptyArray<A>> | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Semigroup<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -590,3 +590,7 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: ReadonlyNonEmptyArray<(a: A) => B>) => ReadonlyNonEmptyArray<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>( | ||
fab: import('./HKT').Kind<'ReadonlyNonEmptyArray', (a: A) => B> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', B> | ||
/** | ||
@@ -614,3 +618,3 @@ * @category instances | ||
second: ReadonlyNonEmptyArray<B> | ||
) => <A>(first: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<A> | ||
) => <A>(first: import('./HKT').Kind<'ReadonlyNonEmptyArray', A>) => import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
/** | ||
@@ -623,3 +627,3 @@ * Combine two effectful actions, keeping only the result of the second. | ||
second: ReadonlyNonEmptyArray<B> | ||
) => <A>(first: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<B> | ||
) => <A>(first: import('./HKT').Kind<'ReadonlyNonEmptyArray', A>) => import('./HKT').Kind<'ReadonlyNonEmptyArray', B> | ||
/** | ||
@@ -703,3 +707,5 @@ * @category instances | ||
name: N | ||
) => <A>(fa: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<{ readonly [K in N]: A }> | ||
) => <A>( | ||
fa: import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
@@ -709,4 +715,4 @@ name: Exclude<N, keyof A>, | ||
) => ( | ||
fa: ReadonlyNonEmptyArray<A> | ||
) => ReadonlyNonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -725,6 +731,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReadonlyNonEmptyArray<B> | ||
f: (a: A) => import('./HKT').Kind<'ReadonlyNonEmptyArray', B> | ||
) => ( | ||
ma: ReadonlyNonEmptyArray<A> | ||
) => ReadonlyNonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
ma: import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -738,4 +744,4 @@ * @category do notation | ||
) => ( | ||
fa: ReadonlyNonEmptyArray<A> | ||
) => ReadonlyNonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -764,3 +770,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const init: <A>(as: ReadonlyNonEmptyArray<A>) => readonly A[] | ||
export declare const init: <A>(as: ReadonlyNonEmptyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -777,3 +783,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const concatAll: <A>(S: Se.Semigroup<A>) => (as: ReadonlyNonEmptyArray<A>) => A | ||
export declare const concatAll: <A>(S: Semigroup<A>) => (as: ReadonlyNonEmptyArray<A>) => A | ||
/** | ||
@@ -785,3 +791,3 @@ * Break a `ReadonlyArray` into its first element and remaining elements. | ||
*/ | ||
export declare const matchLeft: <A, B>(f: (head: A, tail: readonly A[]) => B) => (as: ReadonlyNonEmptyArray<A>) => B | ||
export declare const matchLeft: <A, B>(f: (head: A, tail: ReadonlyArray<A>) => B) => (as: ReadonlyNonEmptyArray<A>) => B | ||
/** | ||
@@ -793,3 +799,5 @@ * Break a `ReadonlyArray` into its initial elements and the last element. | ||
*/ | ||
export declare const matchRight: <A, B>(f: (init: readonly A[], last: A) => B) => (as: ReadonlyNonEmptyArray<A>) => B | ||
export declare const matchRight: <A, B>( | ||
f: (init: ReadonlyArray<A>, last: A) => B | ||
) => (as: ReadonlyNonEmptyArray<A>) => B | ||
/** | ||
@@ -830,3 +838,3 @@ * Apply a function to the head, creating a new `ReadonlyNonEmptyArray`. | ||
*/ | ||
export declare const intercalate: <A>(S: Se.Semigroup<A>) => (middle: A) => (as: ReadonlyNonEmptyArray<A>) => A | ||
export declare const intercalate: <A>(S: Semigroup<A>) => (middle: A) => (as: ReadonlyNonEmptyArray<A>) => A | ||
/** | ||
@@ -911,3 +919,3 @@ * Alias of `flatMap`. | ||
*/ | ||
export declare const snoc: <A>(init: readonly A[], end: A) => ReadonlyNonEmptyArray<A> | ||
export declare const snoc: <A>(init: ReadonlyArray<A>, end: A) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -920,3 +928,3 @@ * Use [`insertAt`](./ReadonlyArray.ts.html#insertat) instead. | ||
*/ | ||
export declare const insertAt: <A>(i: number, a: A) => (as: readonly A[]) => Option<ReadonlyNonEmptyArray<A>> | ||
export declare const insertAt: <A>(i: number, a: A) => (as: ReadonlyArray<A>) => Option<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -937,3 +945,3 @@ * Use [`prependAll`](#prependall) instead. | ||
*/ | ||
export declare const fold: <A>(S: Se.Semigroup<A>) => (as: ReadonlyNonEmptyArray<A>) => A | ||
export declare const fold: <A>(S: Semigroup<A>) => (as: ReadonlyNonEmptyArray<A>) => A | ||
/** | ||
@@ -940,0 +948,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -61,3 +61,3 @@ /** | ||
*/ | ||
export declare const fromRecord: <K extends string, A>(r: Record<K, A>) => Readonly<Record<K, A>> | ||
export declare const fromRecord: <K extends string, A>(r: Record<K, A>) => ReadonlyRecord<K, A> | ||
/** | ||
@@ -77,3 +77,3 @@ * Builds a mutable `Record` from a `ReadonlyRecord`. | ||
*/ | ||
export declare const toRecord: <K extends string, A>(r: Readonly<Record<K, A>>) => Record<K, A> | ||
export declare const toRecord: <K extends string, A>(r: ReadonlyRecord<K, A>) => Record<K, A> | ||
/** | ||
@@ -89,3 +89,3 @@ * Calculate the number of key/value pairs in a `ReadonlyRecord`, | ||
*/ | ||
export declare const size: <A>(r: Readonly<Record<string, A>>) => number | ||
export declare const size: <A>(r: ReadonlyRecord<string, A>) => number | ||
/** | ||
@@ -101,3 +101,3 @@ * Test whether a `ReadonlyRecord` is empty. | ||
*/ | ||
export declare const isEmpty: <A>(r: Readonly<Record<string, A>>) => boolean | ||
export declare const isEmpty: <A>(r: ReadonlyRecord<string, A>) => boolean | ||
/** | ||
@@ -183,3 +183,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const upsertAt: <A>(k: string, a: A) => (r: Readonly<Record<string, A>>) => Readonly<Record<string, A>> | ||
export declare const upsertAt: <A>(k: string, a: A) => (r: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -198,3 +198,3 @@ * Test whether or not a key exists in a `ReadonlyRecord`. | ||
*/ | ||
export declare const has: <K extends string>(k: string, r: Readonly<Record<K, unknown>>) => k is K | ||
export declare const has: <K extends string>(k: string, r: ReadonlyRecord<K, unknown>) => k is K | ||
/** | ||
@@ -232,3 +232,3 @@ * Delete a key and value from a `ReadonlyRecord`. | ||
a: A | ||
) => <K extends string>(r: Readonly<Record<K, A>>) => Option<Readonly<Record<K, A>>> | ||
) => <K extends string>(r: ReadonlyRecord<K, A>) => Option<ReadonlyRecord<K, A>> | ||
/** | ||
@@ -252,3 +252,3 @@ * Applies a mapping function to one specific key/value pair in a `ReadonlyRecord`. | ||
f: (a: A) => A | ||
) => <K extends string>(r: Readonly<Record<K, A>>) => Option<Readonly<Record<K, A>>> | ||
) => <K extends string>(r: ReadonlyRecord<K, A>) => Option<ReadonlyRecord<K, A>> | ||
/** | ||
@@ -451,3 +451,3 @@ * Delete a key and value from a `ReadonlyRecord`, returning the value as well as the subsequent `ReadonlyRecord`. | ||
*/ | ||
export declare const singleton: <A>(k: string, a: A) => Readonly<Record<string, A>> | ||
export declare const singleton: <A>(k: string, a: A) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -762,3 +762,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const toEntries: <K extends string, A>(r: Readonly<Record<K, A>>) => readonly (readonly [K, A])[] | ||
export declare const toEntries: <K extends string, A>(r: ReadonlyRecord<K, A>) => ReadonlyArray<readonly [K, A]> | ||
/** | ||
@@ -775,3 +775,3 @@ * Converts a `ReadonlyArray` of `[key, value]` tuples into a `ReadonlyRecord`. | ||
*/ | ||
export declare const fromEntries: <A>(fa: readonly (readonly [string, A])[]) => Readonly<Record<string, A>> | ||
export declare const fromEntries: <A>(fa: ReadonlyArray<readonly [string, A]>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -841,3 +841,3 @@ * Test if every value in a `ReadonlyRecord` satisfies the predicate. | ||
M: Magma<A> | ||
) => (second: Readonly<Record<string, A>>) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>> | ||
) => (second: ReadonlyRecord<string, A>) => (first: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -863,3 +863,3 @@ * Intersection of two `ReadonlyRecord`s. | ||
M: Magma<A> | ||
) => (second: Readonly<Record<string, A>>) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>> | ||
) => (second: ReadonlyRecord<string, A>) => (first: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -881,4 +881,4 @@ * Difference between two `ReadonlyRecord`s. | ||
export declare const difference: <A>( | ||
second: Readonly<Record<string, A>> | ||
) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>> | ||
second: ReadonlyRecord<string, A> | ||
) => (first: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -1078,3 +1078,3 @@ * Given a `Predicate`, it produces a new `ReadonlyRecord` keeping only the entries with a | ||
*/ | ||
export declare const compact: <A>(r: Readonly<Record<string, Option<A>>>) => Readonly<Record<string, A>> | ||
export declare const compact: <A>(r: ReadonlyRecord<string, Option<A>>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -1104,4 +1104,4 @@ * Separate a `ReadonlyRecord` of `Either`s into `Left`s and `Right`s. | ||
export declare const separate: <A, B>( | ||
r: Readonly<Record<string, Either<A, B>>> | ||
) => Separated<Readonly<Record<string, A>>, Readonly<Record<string, B>>> | ||
r: ReadonlyRecord<string, Either<A, B>> | ||
) => Separated<ReadonlyRecord<string, A>, ReadonlyRecord<string, B>> | ||
/** | ||
@@ -1202,3 +1202,3 @@ * @category type lambdas | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Readonly<Record<string, (a: A) => B>>) => Readonly<Record<string, B>> | ||
export declare const flap: <A>(a: A) => <B>(fab: Kind<'ReadonlyRecord', (a: A) => B>) => Kind<'ReadonlyRecord', B> | ||
/** | ||
@@ -1278,3 +1278,3 @@ * @category instances | ||
*/ | ||
export declare const getUnionSemigroup: <A>(S: Se.Semigroup<A>) => Se.Semigroup<Readonly<Record<string, A>>> | ||
export declare const getUnionSemigroup: <A>(S: Semigroup<A>) => Semigroup<ReadonlyRecord<string, A>> | ||
/** | ||
@@ -1297,3 +1297,3 @@ * Same as `getMonoid`. | ||
*/ | ||
export declare const getUnionMonoid: <A>(S: Se.Semigroup<A>) => Monoid<Readonly<Record<string, A>>> | ||
export declare const getUnionMonoid: <A>(S: Semigroup<A>) => Monoid<ReadonlyRecord<string, A>> | ||
/** | ||
@@ -1316,3 +1316,3 @@ * Given a `Semigroup` in the base type, it produces a `Semigroup` | ||
*/ | ||
export declare const getIntersectionSemigroup: <A>(S: Se.Semigroup<A>) => Se.Semigroup<Readonly<Record<string, A>>> | ||
export declare const getIntersectionSemigroup: <A>(S: Semigroup<A>) => Semigroup<ReadonlyRecord<string, A>> | ||
/** | ||
@@ -1335,3 +1335,3 @@ * Produces a `Magma` with a `concat` function that combines | ||
*/ | ||
export declare const getDifferenceMagma: <A>() => Magma<Readonly<Record<string, A>>> | ||
export declare const getDifferenceMagma: <A>() => Magma<ReadonlyRecord<string, A>> | ||
/** | ||
@@ -1338,0 +1338,0 @@ * Use `getFoldable` instead. |
@@ -33,3 +33,3 @@ /** | ||
*/ | ||
export declare const fromReadonlyArray: <A>(E: Eq<A>) => (as: readonly A[]) => ReadonlySet<A> | ||
export declare const fromReadonlyArray: <A>(E: Eq<A>) => (as: ReadonlyArray<A>) => ReadonlySet<A> | ||
/** | ||
@@ -206,3 +206,3 @@ * @category conversions | ||
*/ | ||
export declare const toReadonlyArray: <A>(O: Ord<A>) => (set: ReadonlySet<A>) => readonly A[] | ||
export declare const toReadonlyArray: <A>(O: Ord<A>) => (set: ReadonlySet<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -209,0 +209,0 @@ * @category type lambdas |
@@ -148,3 +148,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: readonly [(a: A) => B, E]) => readonly [B, E] | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'ReadonlyTuple', E, (a: A) => B>) => import('./HKT').Kind2<'ReadonlyTuple', E, B> | ||
/** | ||
@@ -151,0 +153,0 @@ * Alias of [`mapFst`](#mapfst). |
@@ -655,3 +655,3 @@ /** | ||
*/ | ||
export declare const toEntries: <K extends string, A>(r: Record<K, A>) => [K, A][] | ||
export declare const toEntries: <K extends string, A>(r: Record<K, A>) => Array<[K, A]> | ||
/** | ||
@@ -668,3 +668,3 @@ * Converts an `Array` of `[key, value]` tuples into a `Record`. | ||
*/ | ||
export declare const fromEntries: <A>(fa: [string, A][]) => Record<string, A> | ||
export declare const fromEntries: <A>(fa: Array<[string, A]>) => Record<string, A> | ||
/** | ||
@@ -1129,3 +1129,3 @@ * Create a `Record` from a foldable collection using the specified functions to | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Record<string, (a: A) => B>) => Record<string, B> | ||
export declare const flap: <A>(a: A) => <B>(fab: Kind<'Record', (a: A) => B>) => Kind<'Record', B> | ||
/** | ||
@@ -1205,3 +1205,3 @@ * @category instances | ||
*/ | ||
export declare const getUnionSemigroup: <A>(S: Se.Semigroup<A>) => Se.Semigroup<Record<string, A>> | ||
export declare const getUnionSemigroup: <A>(S: Semigroup<A>) => Semigroup<Record<string, A>> | ||
/** | ||
@@ -1224,3 +1224,3 @@ * Same as `getMonoid`. | ||
*/ | ||
export declare const getUnionMonoid: <A>(S: Se.Semigroup<A>) => Monoid<Record<string, A>> | ||
export declare const getUnionMonoid: <A>(S: Semigroup<A>) => Monoid<Record<string, A>> | ||
/** | ||
@@ -1243,3 +1243,3 @@ * Given a `Semigroup` in the base type, it produces a `Semigroup` | ||
*/ | ||
export declare const getIntersectionSemigroup: <A>(S: Se.Semigroup<A>) => Se.Semigroup<Record<string, A>> | ||
export declare const getIntersectionSemigroup: <A>(S: Semigroup<A>) => Semigroup<Record<string, A>> | ||
/** | ||
@@ -1246,0 +1246,0 @@ * Produces a `Magma` with a `concat` function that combines |
@@ -39,3 +39,3 @@ /** | ||
second: Refinement<A, C> | ||
) => <B extends A>(first: Refinement<A, B>) => Refinement<A, C | B> | ||
) => <B extends A>(first: Refinement<A, B>) => Refinement<A, B | C> | ||
/** | ||
@@ -42,0 +42,0 @@ * @since 2.11.0 |
@@ -25,3 +25,3 @@ import { Semiring } from './Semiring' | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>( | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...rings: { [K in keyof A]: Ring<A[K]> } | ||
@@ -28,0 +28,0 @@ ) => Ring<Readonly<A>> |
@@ -25,3 +25,3 @@ import * as M from './Magma' | ||
*/ | ||
export declare const min: <A>(O: Or.Ord<A>) => Semigroup<A> | ||
export declare const min: <A>(O: Ord<A>) => Semigroup<A> | ||
/** | ||
@@ -41,3 +41,3 @@ * Get a semigroup where `concat` will return the maximum, based on the provided order. | ||
*/ | ||
export declare const max: <A>(O: Or.Ord<A>) => Semigroup<A> | ||
export declare const max: <A>(O: Ord<A>) => Semigroup<A> | ||
/** | ||
@@ -82,3 +82,3 @@ * @category constructors | ||
export declare const struct: <A>(semigroups: { [K in keyof A]: Semigroup<A[K]> }) => Semigroup<{ | ||
readonly [K_1 in keyof A]: A[K_1] | ||
readonly [K in keyof A]: A[K] | ||
}> | ||
@@ -102,3 +102,3 @@ /** | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>( | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...semigroups: { [K in keyof A]: Semigroup<A[K]> } | ||
@@ -231,3 +231,3 @@ ) => Semigroup<Readonly<A>> | ||
*/ | ||
export declare const getJoinSemigroup: <A>(O: Or.Ord<A>) => Semigroup<A> | ||
export declare const getJoinSemigroup: <A>(O: Ord<A>) => Semigroup<A> | ||
/** | ||
@@ -240,3 +240,3 @@ * Use [`min`](#min) instead. | ||
*/ | ||
export declare const getMeetSemigroup: <A>(O: Or.Ord<A>) => Semigroup<A> | ||
export declare const getMeetSemigroup: <A>(O: Ord<A>) => Semigroup<A> | ||
/** | ||
@@ -243,0 +243,0 @@ * Use [`intercalate`](#intercalate) instead. |
@@ -81,3 +81,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Separated<E, (a: A) => B>) => Separated<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Separated', E, (a: A) => B>) => import('./HKT').Kind2<'Separated', E, B> | ||
/** | ||
@@ -84,0 +86,0 @@ * @since 2.10.0 |
@@ -161,3 +161,3 @@ /** | ||
*/ | ||
export declare const fromArray: <A>(E: Eq<A>) => (as: A[]) => Set<A> | ||
export declare const fromArray: <A>(E: Eq<A>) => (as: Array<A>) => Set<A> | ||
/** | ||
@@ -221,3 +221,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const toArray: <A>(O: Ord<A>) => (set: Set<A>) => A[] | ||
export declare const toArray: <A>(O: Ord<A>) => (set: Set<A>) => Array<A> | ||
/** | ||
@@ -224,0 +224,0 @@ * Use [`isSubset`](#issubset) instead. |
@@ -12,7 +12,7 @@ import { ReadonlyRecord } from './ReadonlyRecord' | ||
*/ | ||
export declare const struct: <A>(shows: { [K in keyof A]: Show<A[K]> }) => Show<{ readonly [K_1 in keyof A]: A[K_1] }> | ||
export declare const struct: <A>(shows: { [K in keyof A]: Show<A[K]> }) => Show<{ readonly [K in keyof A]: A[K] }> | ||
/** | ||
* @since 2.10.0 | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>( | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...shows: { [K in keyof A]: Show<A[K]> } | ||
@@ -19,0 +19,0 @@ ) => Show<Readonly<A>> |
@@ -101,3 +101,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: State<E, (a: A) => B>) => State<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'State', E, (a: A) => B>) => import('./HKT').Kind2<'State', E, B> | ||
/** | ||
@@ -118,3 +120,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: State<E, B>) => <A>(first: State<E, A>) => State<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: State<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'State', E, A>) => import('./HKT').Kind2<'State', E, A> | ||
/** | ||
@@ -125,3 +129,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <E, B>(second: State<E, B>) => <A>(first: State<E, A>) => State<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: State<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'State', E, A>) => import('./HKT').Kind2<'State', E, B> | ||
/** | ||
@@ -175,7 +181,9 @@ * @category instances | ||
name: N | ||
) => <E, A>(fa: State<E, A>) => State<E, { readonly [K in N]: A }> | ||
) => <E, A>(fa: import('./HKT').Kind2<'State', E, A>) => import('./HKT').Kind2<'State', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: State<E, A>) => State<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'State', E, A> | ||
) => import('./HKT').Kind2<'State', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -192,4 +200,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => State<E, B> | ||
) => (ma: State<E, A>) => State<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'State', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'State', E, A> | ||
) => import('./HKT').Kind2<'State', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -201,3 +211,5 @@ * @since 2.8.0 | ||
fb: State<E, B> | ||
) => (fa: State<E, A>) => State<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'State', E, A> | ||
) => import('./HKT').Kind2<'State', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -220,3 +232,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(Applicative)`. | ||
f: (index: number, a: A) => State<S, B> | ||
) => (as: readonly A[]) => State<S, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => State<S, ReadonlyArray<B>> | ||
/** | ||
@@ -237,3 +249,5 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
*/ | ||
export declare const traverseArray: <A, S, B>(f: (a: A) => State<S, B>) => (as: readonly A[]) => State<S, readonly B[]> | ||
export declare const traverseArray: <A, S, B>( | ||
f: (a: A) => State<S, B> | ||
) => (as: ReadonlyArray<A>) => State<S, ReadonlyArray<B>> | ||
/** | ||
@@ -240,0 +254,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -173,3 +173,3 @@ /** | ||
*/ | ||
export declare const fromIOEitherK: <E, A extends readonly unknown[], B>( | ||
export declare const fromIOEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => IOEither<E, B> | ||
@@ -181,3 +181,3 @@ ) => <S, R = unknown>(...a: A) => StateReaderTaskEither<S, R, E, B> | ||
*/ | ||
export declare const fromTaskEitherK: <E, A extends readonly unknown[], B>( | ||
export declare const fromTaskEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => TaskEither<E, B> | ||
@@ -189,4 +189,4 @@ ) => <S, R = unknown>(...a: A) => StateReaderTaskEither<S, R, E, B> | ||
*/ | ||
export declare const fromReaderTaskEitherK: <R, E, A extends readonly unknown[], B>( | ||
f: (...a: A) => RTE.ReaderTaskEither<R, E, B> | ||
export declare const fromReaderTaskEitherK: <R, E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => ReaderTaskEither<R, E, B> | ||
) => <S>(...a: A) => StateReaderTaskEither<S, R, E, B> | ||
@@ -202,4 +202,4 @@ /** | ||
export declare const chainReaderTaskEitherKW: <R, E2, A, B>( | ||
f: (a: A) => RTE.ReaderTaskEither<R, E2, B> | ||
) => <S, E1>(ma: StateReaderTaskEither<S, R, E1, A>) => StateReaderTaskEither<S, R, E2 | E1, B> | ||
f: (a: A) => ReaderTaskEither<R, E2, B> | ||
) => <S, E1>(ma: StateReaderTaskEither<S, R, E1, A>) => StateReaderTaskEither<S, R, E1 | E2, B> | ||
/** | ||
@@ -418,3 +418,3 @@ * Alias of `flatMapReaderTaskEither`. | ||
that: () => StateReaderTaskEither<S, R2, E2, B> | ||
) => <R1, E1, A>(fa: StateReaderTaskEither<S, R1, E1, A>) => StateReaderTaskEither<S, R1 & R2, E2, B | A> | ||
) => <R1, E1, A>(fa: StateReaderTaskEither<S, R1, E1, A>) => StateReaderTaskEither<S, R1 & R2, E2, A | B> | ||
/** | ||
@@ -479,3 +479,5 @@ * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to | ||
a: A | ||
) => <S, R, E, B>(fab: StateReaderTaskEither<S, R, E, (a: A) => B>) => StateReaderTaskEither<S, R, E, B> | ||
) => <S, R, E, B>( | ||
fab: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, (a: A) => B> | ||
) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, B> | ||
/** | ||
@@ -498,3 +500,5 @@ * @category instances | ||
second: StateReaderTaskEither<S, R, E, B> | ||
) => <A>(first: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, A> | ||
) => <A>( | ||
first: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
/** | ||
@@ -517,3 +521,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
second: StateReaderTaskEither<S, R, E, B> | ||
) => <A>(first: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B> | ||
) => <A>( | ||
first: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, B> | ||
/** | ||
@@ -1027,3 +1033,5 @@ * Less strict version of [`apSecond`](#apsecond). | ||
name: N | ||
) => <S, R, E, A>(fa: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, { readonly [K in N]: A }> | ||
) => <S, R, E, A>( | ||
fa: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
@@ -1033,4 +1041,10 @@ name: Exclude<N, keyof A>, | ||
) => <S, R, E>( | ||
fa: StateReaderTaskEither<S, R, E, A> | ||
) => StateReaderTaskEither<S, R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4< | ||
'StateReaderTaskEither', | ||
S, | ||
R, | ||
E, | ||
{ readonly [K in keyof A | N]: K extends keyof A ? A[K] : B } | ||
> | ||
export { | ||
@@ -1047,6 +1061,12 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => StateReaderTaskEither<S, R, E, B> | ||
f: (a: A) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, B> | ||
) => ( | ||
ma: StateReaderTaskEither<S, R, E, A> | ||
) => StateReaderTaskEither<S, R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
ma: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4< | ||
'StateReaderTaskEither', | ||
S, | ||
R, | ||
E, | ||
{ readonly [K in keyof A | N]: K extends keyof A ? A[K] : B } | ||
> | ||
/** | ||
@@ -1077,4 +1097,10 @@ * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. | ||
) => ( | ||
fa: StateReaderTaskEither<S, R, E, A> | ||
) => StateReaderTaskEither<S, R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4< | ||
'StateReaderTaskEither', | ||
S, | ||
R, | ||
E, | ||
{ readonly [K in keyof A | N]: K extends keyof A ? A[K] : B } | ||
> | ||
/** | ||
@@ -1118,3 +1144,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => StateReaderTaskEither<S, R, E, B> | ||
) => (as: readonly A[]) => StateReaderTaskEither<S, R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => StateReaderTaskEither<S, R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1137,3 +1163,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => StateReaderTaskEither<S, R, E, B> | ||
) => (as: readonly A[]) => StateReaderTaskEither<S, R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => StateReaderTaskEither<S, R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1140,0 +1166,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -102,3 +102,3 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Store<E, (a: A) => B>) => Store<E, B> | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Kind2<'Store', E, (a: A) => B>) => Kind2<'Store', E, B> | ||
/** | ||
@@ -105,0 +105,0 @@ * @category instances |
@@ -42,2 +42,2 @@ import { Semigroup } from './Semigroup' | ||
transformations: F | ||
) => (a: A) => { [K_1 in keyof F]: ReturnType<F[K_1]> } | ||
) => (a: A) => { [K in keyof F]: ReturnType<F[K]> } |
@@ -158,3 +158,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Task<(a: A) => B>) => Task<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'Task', (a: A) => B>) => import('./HKT').Kind<'Task', B> | ||
/** | ||
@@ -177,3 +179,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: Task<B>) => <A>(first: Task<A>) => Task<A> | ||
export declare const apFirst: <B>( | ||
second: Task<B> | ||
) => <A>(first: import('./HKT').Kind<'Task', A>) => import('./HKT').Kind<'Task', A> | ||
/** | ||
@@ -184,3 +188,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: Task<B>) => <A>(first: Task<A>) => Task<B> | ||
export declare const apSecond: <B>( | ||
second: Task<B> | ||
) => <A>(first: import('./HKT').Kind<'Task', A>) => import('./HKT').Kind<'Task', B> | ||
/** | ||
@@ -324,7 +330,11 @@ * Runs computations in parallel. | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: Task<A>) => Task<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'Task', A>) => import('./HKT').Kind<'Task', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: Task<A>) => Task<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'Task', A> | ||
) => import('./HKT').Kind<'Task', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -343,4 +353,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Task<B> | ||
) => (ma: Task<A>) => Task<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'Task', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'Task', A> | ||
) => import('./HKT').Kind<'Task', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -353,3 +365,5 @@ * @category do notation | ||
fb: Task<B> | ||
) => (fa: Task<A>) => Task<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'Task', A> | ||
) => import('./HKT').Kind<'Task', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -376,3 +390,3 @@ * @since 2.11.0 | ||
f: (index: number, a: A) => Task<B> | ||
) => (as: readonly A[]) => Task<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Task<ReadonlyArray<B>> | ||
/** | ||
@@ -395,3 +409,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => Task<B> | ||
) => (as: readonly A[]) => Task<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Task<ReadonlyArray<B>> | ||
/** | ||
@@ -412,3 +426,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
*/ | ||
export declare const traverseArray: <A, B>(f: (a: A) => Task<B>) => (as: readonly A[]) => Task<readonly B[]> | ||
export declare const traverseArray: <A, B>(f: (a: A) => Task<B>) => (as: ReadonlyArray<A>) => Task<ReadonlyArray<B>> | ||
/** | ||
@@ -436,3 +450,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
*/ | ||
export declare const traverseSeqArray: <A, B>(f: (a: A) => Task<B>) => (as: readonly A[]) => Task<readonly B[]> | ||
export declare const traverseSeqArray: <A, B>(f: (a: A) => Task<B>) => (as: ReadonlyArray<A>) => Task<ReadonlyArray<B>> | ||
/** | ||
@@ -439,0 +453,0 @@ * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. |
@@ -135,5 +135,5 @@ /** | ||
export declare const fold: <E, A, B>( | ||
onLeft: (e: E) => T.Task<B>, | ||
onRight: (a: A) => T.Task<B> | ||
) => (ma: TaskEither<E, A>) => T.Task<B> | ||
onLeft: (e: E) => Task<B>, | ||
onRight: (a: A) => Task<B> | ||
) => (ma: TaskEither<E, A>) => Task<B> | ||
/** | ||
@@ -158,5 +158,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, B, A, C>( | ||
onLeft: (e: E) => T.Task<B>, | ||
onRight: (a: A) => T.Task<C> | ||
) => (ma: TaskEither<E, A>) => T.Task<B | C> | ||
onLeft: (e: E) => Task<B>, | ||
onRight: (a: A) => Task<C> | ||
) => (ma: TaskEither<E, A>) => Task<B | C> | ||
/** | ||
@@ -202,3 +202,3 @@ * @category error handling | ||
*/ | ||
export declare const tryCatchK: <E, A extends readonly unknown[], B>( | ||
export declare const tryCatchK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => Promise<B>, | ||
@@ -309,3 +309,3 @@ onRejected: (reason: unknown) => E | ||
onNone: LazyArg<E> | ||
) => <A extends readonly unknown[], B>(f: (...a: A) => TaskOption<B>) => (...a: A) => TaskEither<E, B> | ||
) => <A extends ReadonlyArray<unknown>, B>(f: (...a: A) => TaskOption<B>) => (...a: A) => TaskEither<E, B> | ||
/** | ||
@@ -321,3 +321,3 @@ * Use `flatMapTaskOption`. | ||
onNone: LazyArg<E2> | ||
) => <A, B>(f: (a: A) => TaskOption<B>) => <E1>(ma: TaskEither<E1, A>) => TaskEither<E2 | E1, B> | ||
) => <A, B>(f: (a: A) => TaskOption<B>) => <E1>(ma: TaskEither<E1, A>) => TaskEither<E1 | E2, B> | ||
/** | ||
@@ -336,3 +336,3 @@ * Use `flatMapTaskOption`. | ||
*/ | ||
export declare const fromIOEitherK: <E, A extends readonly unknown[], B>( | ||
export declare const fromIOEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => IOEither<E, B> | ||
@@ -591,3 +591,3 @@ ) => (...a: A) => TaskEither<E, B> | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<'TaskEither', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<URI, E> | ||
/** | ||
@@ -624,3 +624,5 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: TaskEither<E, (a: A) => B>) => TaskEither<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'TaskEither', E, (a: A) => B>) => import('./HKT').Kind2<'TaskEither', E, B> | ||
/** | ||
@@ -643,3 +645,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: TaskEither<E, B>) => <A>(first: TaskEither<E, A>) => TaskEither<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: TaskEither<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'TaskEither', E, A>) => import('./HKT').Kind2<'TaskEither', E, A> | ||
/** | ||
@@ -660,3 +664,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
*/ | ||
export declare const apSecond: <E, B>(second: TaskEither<E, B>) => <A>(first: TaskEither<E, A>) => TaskEither<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: TaskEither<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'TaskEither', E, A>) => import('./HKT').Kind2<'TaskEither', E, B> | ||
/** | ||
@@ -1155,3 +1161,3 @@ * Less strict version of [`apSecond`](#apsecond). | ||
use: (a: A) => TaskEither<E, B>, | ||
release: (a: A, e: E.Either<E, B>) => TaskEither<E, void> | ||
release: (a: A, e: Either<E, B>) => TaskEither<E, void> | ||
) => TaskEither<E, B> | ||
@@ -1181,7 +1187,11 @@ /** | ||
name: N | ||
) => <E, A>(fa: TaskEither<E, A>) => TaskEither<E, { readonly [K in N]: A }> | ||
) => <E, A>( | ||
fa: import('./HKT').Kind2<'TaskEither', E, A> | ||
) => import('./HKT').Kind2<'TaskEither', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: TaskEither<E, A>) => TaskEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'TaskEither', E, A> | ||
) => import('./HKT').Kind2<'TaskEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -1200,4 +1210,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => TaskEither<E, B> | ||
) => (ma: TaskEither<E, A>) => TaskEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'TaskEither', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'TaskEither', E, A> | ||
) => import('./HKT').Kind2<'TaskEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1225,3 +1237,5 @@ * The `W` suffix (short for **W**idening) means that the error types will be merged. | ||
fb: TaskEither<E, B> | ||
) => (fa: TaskEither<E, A>) => TaskEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'TaskEither', E, A> | ||
) => import('./HKT').Kind2<'TaskEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1265,3 +1279,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => TaskEither<E, B> | ||
) => (as: readonly A[]) => TaskEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1284,3 +1298,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => TaskEither<E, B> | ||
) => (as: readonly A[]) => TaskEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1303,3 +1317,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => TaskEither<E, B> | ||
) => (as: readonly A[]) => TaskEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1329,3 +1343,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
f: (a: A) => TaskEither<E, B> | ||
) => (as: readonly A[]) => TaskEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1332,0 +1346,0 @@ * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. |
@@ -103,6 +103,3 @@ /** | ||
*/ | ||
export declare const fold: <B, A>( | ||
onNone: () => T.Task<B>, | ||
onSome: (a: A) => T.Task<B> | ||
) => (ma: TaskOption<A>) => T.Task<B> | ||
export declare const fold: <B, A>(onNone: () => Task<B>, onSome: (a: A) => Task<B>) => (ma: TaskOption<A>) => Task<B> | ||
/** | ||
@@ -127,5 +124,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <B, C, A>( | ||
onNone: () => T.Task<B>, | ||
onSome: (a: A) => T.Task<C> | ||
) => (ma: TaskOption<A>) => T.Task<B | C> | ||
onNone: () => Task<B>, | ||
onSome: (a: A) => Task<C> | ||
) => (ma: TaskOption<A>) => Task<B | C> | ||
/** | ||
@@ -165,3 +162,3 @@ * @category error handling | ||
*/ | ||
export declare const tryCatchK: <A extends readonly unknown[], B>( | ||
export declare const tryCatchK: <A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => Promise<B> | ||
@@ -345,3 +342,5 @@ ) => (...a: A) => TaskOption<B> | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: TaskOption<(a: A) => B>) => TaskOption<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'TaskOption', (a: A) => B>) => import('./HKT').Kind<'TaskOption', B> | ||
/** | ||
@@ -364,3 +363,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: TaskOption<B>) => <A>(first: TaskOption<A>) => TaskOption<A> | ||
export declare const apFirst: <B>( | ||
second: TaskOption<B> | ||
) => <A>(first: import('./HKT').Kind<'TaskOption', A>) => import('./HKT').Kind<'TaskOption', A> | ||
/** | ||
@@ -371,3 +372,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: TaskOption<B>) => <A>(first: TaskOption<A>) => TaskOption<B> | ||
export declare const apSecond: <B>( | ||
second: TaskOption<B> | ||
) => <A>(first: import('./HKT').Kind<'TaskOption', A>) => import('./HKT').Kind<'TaskOption', B> | ||
/** | ||
@@ -532,3 +535,3 @@ * Runs computations in parallel. | ||
*/ | ||
export declare const guard: (b: boolean) => TaskOption<void> | ||
export declare const guard: (b: boolean) => import('./HKT').Kind<'TaskOption', void> | ||
/** | ||
@@ -634,7 +637,9 @@ * @category instances | ||
name: N | ||
) => <A>(fa: TaskOption<A>) => TaskOption<{ readonly [K in N]: A }> | ||
) => <A>(fa: import('./HKT').Kind<'TaskOption', A>) => import('./HKT').Kind<'TaskOption', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: TaskOption<A>) => TaskOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'TaskOption', A> | ||
) => import('./HKT').Kind<'TaskOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -653,4 +658,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => TaskOption<B> | ||
) => (ma: TaskOption<A>) => TaskOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'TaskOption', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'TaskOption', A> | ||
) => import('./HKT').Kind<'TaskOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -663,3 +670,5 @@ * @category do notation | ||
fb: TaskOption<B> | ||
) => (fa: TaskOption<A>) => TaskOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'TaskOption', A> | ||
) => import('./HKT').Kind<'TaskOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -686,3 +695,3 @@ * @since 2.11.0 | ||
f: (index: number, a: A) => TaskOption<B> | ||
) => (as: readonly A[]) => TaskOption<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskOption<ReadonlyArray<B>> | ||
/** | ||
@@ -705,3 +714,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => TaskOption<B> | ||
) => (as: readonly A[]) => TaskOption<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskOption<ReadonlyArray<B>> | ||
/** | ||
@@ -708,0 +717,0 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. |
@@ -134,6 +134,6 @@ /** | ||
export declare const fold: <E, B, A>( | ||
onLeft: (e: E) => T.Task<B>, | ||
onRight: (a: A) => T.Task<B>, | ||
onBoth: (e: E, a: A) => T.Task<B> | ||
) => (fa: TaskThese<E, A>) => T.Task<B> | ||
onLeft: (e: E) => Task<B>, | ||
onRight: (a: A) => Task<B>, | ||
onBoth: (e: E, a: A) => Task<B> | ||
) => (fa: TaskThese<E, A>) => Task<B> | ||
/** | ||
@@ -159,6 +159,6 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, B, A, C, D>( | ||
onLeft: (e: E) => T.Task<B>, | ||
onRight: (a: A) => T.Task<C>, | ||
onBoth: (e: E, a: A) => T.Task<D> | ||
) => (fa: TaskThese<E, A>) => T.Task<B | C | D> | ||
onLeft: (e: E) => Task<B>, | ||
onRight: (a: A) => Task<C>, | ||
onBoth: (e: E, a: A) => Task<D> | ||
) => (fa: TaskThese<E, A>) => Task<B | C | D> | ||
/** | ||
@@ -214,3 +214,3 @@ * @since 2.4.0 | ||
*/ | ||
export declare const getApply: <E>(A: Apply1<T.URI>, S: Semigroup<E>) => Apply2C<'TaskThese', E> | ||
export declare const getApply: <E>(A: Apply1<T.URI>, S: Semigroup<E>) => Apply2C<URI, E> | ||
/** | ||
@@ -240,3 +240,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: TaskThese<E, (a: A) => B>) => TaskThese<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'TaskThese', E, (a: A) => B>) => import('./HKT').Kind2<'TaskThese', E, B> | ||
/** | ||
@@ -341,3 +343,3 @@ * @category instances | ||
S: Semigroup<E> | ||
) => <A, B>(f: (index: number, a: A) => TaskThese<E, B>) => (as: readonly A[]) => TaskThese<E, readonly B[]> | ||
) => <A, B>(f: (index: number, a: A) => TaskThese<E, B>) => (as: ReadonlyArray<A>) => TaskThese<E, ReadonlyArray<B>> | ||
/** | ||
@@ -362,3 +364,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(getApplicative(T.ApplicativeSeq, S))`. | ||
S: Semigroup<E> | ||
) => <A, B>(f: (index: number, a: A) => TaskThese<E, B>) => (as: readonly A[]) => TaskThese<E, readonly B[]> | ||
) => <A, B>(f: (index: number, a: A) => TaskThese<E, B>) => (as: ReadonlyArray<A>) => TaskThese<E, ReadonlyArray<B>> | ||
/** | ||
@@ -387,3 +389,3 @@ * Use [`Functor`](#functor) instead. | ||
*/ | ||
export declare const toTuple: <E, A>(e: E, a: A) => (fa: TaskThese<E, A>) => T.Task<[E, A]> | ||
export declare const toTuple: <E, A>(e: E, a: A) => (fa: TaskThese<E, A>) => Task<[E, A]> | ||
/** | ||
@@ -390,0 +392,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -161,3 +161,3 @@ /** | ||
*/ | ||
export declare const getApply: <E>(S: Semigroup<E>) => Apply2C<'These', E> | ||
export declare const getApply: <E>(S: Semigroup<E>) => Apply2C<URI, E> | ||
/** | ||
@@ -354,3 +354,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: These<E, (a: A) => B>) => These<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'These', E, (a: A) => B>) => import('./HKT').Kind2<'These', E, B> | ||
/** | ||
@@ -458,3 +460,3 @@ * @category instances | ||
S: Semigroup<E> | ||
) => <A, B>(f: (index: number, a: A) => These<E, B>) => (as: readonly A[]) => These<E, readonly B[]> | ||
) => <A, B>(f: (index: number, a: A) => These<E, B>) => (as: ReadonlyArray<A>) => These<E, ReadonlyArray<B>> | ||
/** | ||
@@ -461,0 +463,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -75,3 +75,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Traced<E, (a: A) => B>) => Traced<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Traced', E, (a: A) => B>) => import('./HKT').Kind2<'Traced', E, B> | ||
/** | ||
@@ -78,0 +80,0 @@ * Use [`Functor`](#functor) instead. |
@@ -270,3 +270,3 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Tree<(a: A) => B>) => Tree<B> | ||
export declare const flap: <A>(a: A) => <B>(fab: Kind<'Tree', (a: A) => B>) => Kind<'Tree', B> | ||
/** | ||
@@ -287,3 +287,3 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: Tree<B>) => <A>(first: Tree<A>) => Tree<A> | ||
export declare const apFirst: <B>(second: Tree<B>) => <A>(first: Kind<'Tree', A>) => Kind<'Tree', A> | ||
/** | ||
@@ -294,3 +294,3 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: Tree<B>) => <A>(first: Tree<A>) => Tree<B> | ||
export declare const apSecond: <B>(second: Tree<B>) => <A>(first: Kind<'Tree', A>) => Kind<'Tree', B> | ||
/** | ||
@@ -342,7 +342,9 @@ * @category instances | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: Tree<A>) => Tree<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: Kind<'Tree', A>) => Kind<'Tree', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: Tree<A>) => Tree<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => (fa: Kind<'Tree', A>) => Kind<'Tree', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -361,4 +363,4 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Tree<B> | ||
) => (ma: Tree<A>) => Tree<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => Kind<'Tree', B> | ||
) => (ma: Kind<'Tree', A>) => Kind<'Tree', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -371,3 +373,3 @@ * @category do notation | ||
fb: Tree<B> | ||
) => (fa: Tree<A>) => Tree<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => (fa: Kind<'Tree', A>) => Kind<'Tree', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -374,0 +376,0 @@ * @since 2.0.0 |
@@ -145,3 +145,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: [(a: A) => B, E]) => [B, E] | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Tuple', E, (a: A) => B>) => import('./HKT').Kind2<'Tuple', E, B> | ||
/** | ||
@@ -148,0 +150,0 @@ * @category instances |
@@ -77,3 +77,3 @@ /** | ||
*/ | ||
export declare const getPointed: <W>(M: Monoid<W>) => Pointed2C<'Writer', W> | ||
export declare const getPointed: <W>(M: Monoid<W>) => Pointed2C<URI, W> | ||
/** | ||
@@ -83,3 +83,3 @@ * @category instances | ||
*/ | ||
export declare const getApply: <W>(S: Semigroup<W>) => Apply2C<'Writer', W> | ||
export declare const getApply: <W>(S: Semigroup<W>) => Apply2C<URI, W> | ||
/** | ||
@@ -89,3 +89,3 @@ * @category instances | ||
*/ | ||
export declare const getApplicative: <W>(M: Monoid<W>) => Applicative2C<'Writer', W> | ||
export declare const getApplicative: <W>(M: Monoid<W>) => Applicative2C<URI, W> | ||
/** | ||
@@ -110,3 +110,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Writer<E, (a: A) => B>) => Writer<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Writer', E, (a: A) => B>) => import('./HKT').Kind2<'Writer', E, B> | ||
/** | ||
@@ -113,0 +115,0 @@ * @since 2.8.0 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.altAll = void 0; | ||
exports.altAll = altAll; | ||
function altAll(F) { | ||
return function (startWith) { return function (as) { return as.reduce(function (acc, a) { return F.alt(acc, function () { return a; }); }, startWith); }; }; | ||
} | ||
exports.altAll = altAll; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAlternativeMonoid = exports.altAll = void 0; | ||
exports.altAll = altAll; | ||
exports.getAlternativeMonoid = getAlternativeMonoid; | ||
/** | ||
@@ -25,3 +26,2 @@ * The `Alternative` type class extends the `Alt` type class with a value that should be the left and right identity for `alt`. | ||
} | ||
exports.altAll = altAll; | ||
function getAlternativeMonoid(F) { | ||
@@ -39,2 +39,1 @@ var f = (0, Apply_1.getApplySemigroup)(F); | ||
} | ||
exports.getAlternativeMonoid = getAlternativeMonoid; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getApplicativeComposition = exports.getApplicativeMonoid = void 0; | ||
exports.getApplicativeMonoid = getApplicativeMonoid; | ||
exports.getApplicativeComposition = getApplicativeComposition; | ||
/** | ||
@@ -33,3 +34,2 @@ * The `Applicative` type class extends the `Apply` type class with a `of` function, which can be used to create values | ||
} | ||
exports.getApplicativeMonoid = getApplicativeMonoid; | ||
/** @deprecated */ | ||
@@ -45,2 +45,1 @@ function getApplicativeComposition(F, G) { | ||
} | ||
exports.getApplicativeComposition = getApplicativeComposition; |
@@ -26,3 +26,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sequenceS = exports.sequenceT = exports.getApplySemigroup = exports.apS = exports.apSecond = exports.apFirst = exports.ap = void 0; | ||
exports.ap = ap; | ||
exports.apFirst = apFirst; | ||
exports.apSecond = apSecond; | ||
exports.apS = apS; | ||
exports.getApplySemigroup = getApplySemigroup; | ||
exports.sequenceT = sequenceT; | ||
exports.sequenceS = sequenceS; | ||
/** | ||
@@ -74,3 +80,2 @@ * The `Apply` class provides the `ap` which is used to apply a function to an argument under a type constructor. | ||
} | ||
exports.ap = ap; | ||
function apFirst(A) { | ||
@@ -81,3 +86,2 @@ return function (second) { return function (first) { | ||
} | ||
exports.apFirst = apFirst; | ||
function apSecond(A) { | ||
@@ -90,3 +94,2 @@ return function (second) { | ||
} | ||
exports.apSecond = apSecond; | ||
function apS(F) { | ||
@@ -102,3 +105,2 @@ return function (name, fb) { | ||
} | ||
exports.apS = apS; | ||
function getApplySemigroup(F) { | ||
@@ -111,3 +113,2 @@ return function (S) { return ({ | ||
} | ||
exports.getApplySemigroup = getApplySemigroup; | ||
function curried(f, n, acc) { | ||
@@ -151,3 +152,2 @@ return function (x) { | ||
} | ||
exports.sequenceT = sequenceT; | ||
function getRecordConstructor(keys) { | ||
@@ -218,2 +218,1 @@ var len = keys.length; | ||
} | ||
exports.sequenceS = sequenceS; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMinMaxBoundedDistributiveLattice = void 0; | ||
exports.getMinMaxBoundedDistributiveLattice = getMinMaxBoundedDistributiveLattice; | ||
var DistributiveLattice_1 = require("./DistributiveLattice"); | ||
@@ -21,2 +21,1 @@ // ------------------------------------------------------------------------------------- | ||
} | ||
exports.getMinMaxBoundedDistributiveLattice = getMinMaxBoundedDistributiveLattice; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bind = exports.tap = exports.chainFirst = void 0; | ||
exports.chainFirst = chainFirst; | ||
exports.tap = tap; | ||
exports.bind = bind; | ||
function chainFirst(M) { | ||
@@ -8,3 +10,2 @@ var tapM = tap(M); | ||
} | ||
exports.chainFirst = chainFirst; | ||
/** @internal */ | ||
@@ -14,3 +15,2 @@ function tap(M) { | ||
} | ||
exports.tap = tap; | ||
function bind(M) { | ||
@@ -22,2 +22,1 @@ return function (name, f) { return function (ma) { return M.chain(ma, function (a) { return M.map(f(a), function (b) { | ||
} | ||
exports.bind = bind; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fanin = exports.splitChoice = exports.fanIn = exports.split = void 0; | ||
exports.split = split; | ||
exports.fanIn = fanIn; | ||
exports.splitChoice = splitChoice; | ||
exports.fanin = fanin; | ||
var function_1 = require("./function"); | ||
@@ -8,3 +11,2 @@ function split(P, C) { | ||
} | ||
exports.split = split; | ||
function fanIn(P, C) { | ||
@@ -16,10 +18,7 @@ var splitPC = split(P, C); | ||
} | ||
exports.fanIn = fanIn; | ||
function splitChoice(F) { | ||
return split(F, F); | ||
} | ||
exports.splitChoice = splitChoice; | ||
function fanin(F) { | ||
return fanIn(F, F); | ||
} | ||
exports.fanin = fanin; |
@@ -26,3 +26,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getCompactableComposition = exports.separate = exports.compact = void 0; | ||
exports.compact = compact; | ||
exports.separate = separate; | ||
exports.getCompactableComposition = getCompactableComposition; | ||
var function_1 = require("./function"); | ||
@@ -35,3 +37,2 @@ var Functor_1 = require("./Functor"); | ||
} | ||
exports.compact = compact; | ||
function separate(F, C, G) { | ||
@@ -42,3 +43,2 @@ var _compact = compact(F, C); | ||
} | ||
exports.separate = separate; | ||
/** @deprecated */ | ||
@@ -53,2 +53,1 @@ function getCompactableComposition(F, G) { | ||
} | ||
exports.getCompactableComposition = getCompactableComposition; |
@@ -147,3 +147,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Const<E, (a: A) => B>) => Const<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Const', E, (a: A) => B>) => import('./HKT').Kind2<'Const', E, B> | ||
/** | ||
@@ -150,0 +152,0 @@ * @category instances |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.const_ = exports.Bifunctor = exports.Contravariant = exports.flap = exports.Functor = exports.URI = exports.mapLeft = exports.bimap = exports.map = exports.contramap = exports.getApplicative = exports.getApply = exports.getBooleanAlgebra = exports.getHeytingAlgebra = exports.getRing = exports.getSemiring = exports.getMonoid = exports.getSemigroup = exports.getBounded = exports.getOrd = exports.getEq = exports.getShow = exports.make = void 0; | ||
exports.const_ = exports.Bifunctor = exports.Contravariant = exports.flap = exports.Functor = exports.URI = exports.mapLeft = exports.bimap = exports.map = exports.contramap = exports.getBooleanAlgebra = exports.getHeytingAlgebra = exports.getRing = exports.getSemiring = exports.getMonoid = exports.getSemigroup = exports.getBounded = exports.getOrd = exports.getEq = exports.make = void 0; | ||
exports.getShow = getShow; | ||
exports.getApply = getApply; | ||
exports.getApplicative = getApplicative; | ||
var function_1 = require("./function"); | ||
@@ -20,3 +23,2 @@ var Functor_1 = require("./Functor"); | ||
} | ||
exports.getShow = getShow; | ||
/** | ||
@@ -79,3 +81,2 @@ * @category instances | ||
} | ||
exports.getApply = getApply; | ||
/** | ||
@@ -95,3 +96,2 @@ * @category instances | ||
} | ||
exports.getApplicative = getApplicative; | ||
var _contramap = function (fa, f) { return (0, function_1.pipe)(fa, (0, exports.contramap)(f)); }; | ||
@@ -98,0 +98,0 @@ /* istanbul ignore next */ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMinMaxDistributiveLattice = void 0; | ||
exports.getMinMaxDistributiveLattice = getMinMaxDistributiveLattice; | ||
var Ord_1 = require("./Ord"); | ||
@@ -18,2 +18,1 @@ // ------------------------------------------------------------------------------------- | ||
} | ||
exports.getMinMaxDistributiveLattice = getMinMaxDistributiveLattice; |
@@ -184,3 +184,3 @@ /** | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<'Either', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<URI, E> | ||
/** | ||
@@ -192,3 +192,3 @@ * Builds a `Filterable` instance for `Either` given `Monoid` for the left side | ||
*/ | ||
export declare const getFilterable: <E>(M: Monoid<E>) => Filterable2C<'Either', E> | ||
export declare const getFilterable: <E>(M: Monoid<E>) => Filterable2C<URI, E> | ||
/** | ||
@@ -200,3 +200,3 @@ * Builds `Witherable` instance for `Either` given `Monoid` for the left side | ||
*/ | ||
export declare const getWitherable: <E>(M: Monoid<E>) => Witherable2C<'Either', E> | ||
export declare const getWitherable: <E>(M: Monoid<E>) => Witherable2C<URI, E> | ||
/** | ||
@@ -255,3 +255,3 @@ * The default [`Applicative`](#applicative) instance returns the first error, if you want to | ||
*/ | ||
export declare const getApplicativeValidation: <E>(SE: Semigroup<E>) => Applicative2C<'Either', E> | ||
export declare const getApplicativeValidation: <E>(SE: Semigroup<E>) => Applicative2C<URI, E> | ||
/** | ||
@@ -291,3 +291,3 @@ * The default [`Alt`](#alt) instance returns the last error, if you want to | ||
*/ | ||
export declare const getAltValidation: <E>(SE: Semigroup<E>) => Alt2C<'Either', E> | ||
export declare const getAltValidation: <E>(SE: Semigroup<E>) => Alt2C<URI, E> | ||
/** | ||
@@ -739,3 +739,3 @@ * @category mapping | ||
*/ | ||
export declare const getOrElseW: <E, B>(onLeft: (e: E) => B) => <A>(ma: Either<E, A>) => B | A | ||
export declare const getOrElseW: <E, B>(onLeft: (e: E) => B) => <A>(ma: Either<E, A>) => A | B | ||
/** | ||
@@ -771,3 +771,5 @@ * Returns the wrapped value if it's a `Right` or a default value if is a `Left`. | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Either<E, (a: A) => B>) => Either<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Either', E, (a: A) => B>) => import('./HKT').Kind2<'Either', E, B> | ||
/** | ||
@@ -778,3 +780,5 @@ * Combine two effectful actions, keeping only the result of the first. | ||
*/ | ||
export declare const apFirst: <E, B>(second: Either<E, B>) => <A>(first: Either<E, A>) => Either<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: Either<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'Either', E, A>) => import('./HKT').Kind2<'Either', E, A> | ||
/** | ||
@@ -793,3 +797,5 @@ * Less strict version of [`apFirst`](#apfirst) | ||
*/ | ||
export declare const apSecond: <E, B>(second: Either<E, B>) => <A>(first: Either<E, A>) => Either<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: Either<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'Either', E, A>) => import('./HKT').Kind2<'Either', E, B> | ||
/** | ||
@@ -980,3 +986,3 @@ * Less strict version of [`apSecond`](#apsecond) | ||
onLeft: (e: E1) => Either<E2, B> | ||
) => <A>(ma: Either<E1, A>) => Either<E2, B | A> | ||
) => <A>(ma: Either<E1, A>) => Either<E2, A | B> | ||
/** | ||
@@ -1037,3 +1043,3 @@ * Useful for recovering from errors. | ||
*/ | ||
export declare const tryCatchK: <A extends readonly unknown[], B, E>( | ||
export declare const tryCatchK: <A extends ReadonlyArray<unknown>, B, E>( | ||
f: (...a: A) => B, | ||
@@ -1050,3 +1056,5 @@ onThrow: (error: unknown) => E | ||
e: E | ||
) => <A extends readonly unknown[], B>(f: (...a: A) => B | null | undefined) => (...a: A) => Either<E, NonNullable<B>> | ||
) => <A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => B | null | undefined | ||
) => (...a: A) => Either<E, NonNullable<B>> | ||
/** | ||
@@ -1105,7 +1113,9 @@ * Use `flatMapNullable`. | ||
name: N | ||
) => <E, A>(fa: Either<E, A>) => Either<E, { readonly [K in N]: A }> | ||
) => <E, A>(fa: import('./HKT').Kind2<'Either', E, A>) => import('./HKT').Kind2<'Either', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: Either<E, A>) => Either<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'Either', E, A> | ||
) => import('./HKT').Kind2<'Either', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -1124,4 +1134,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Either<E, B> | ||
) => (ma: Either<E, A>) => Either<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'Either', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'Either', E, A> | ||
) => import('./HKT').Kind2<'Either', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1149,3 +1161,5 @@ * The `W` suffix (short for **W**idening) means that the error types will be merged. | ||
fb: Either<E, B> | ||
) => (fa: Either<E, A>) => Either<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'Either', E, A> | ||
) => import('./HKT').Kind2<'Either', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1189,3 +1203,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => Either<E, B> | ||
) => (as: readonly A[]) => Either<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Either<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1208,3 +1222,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => Either<E, B> | ||
) => (as: readonly A[]) => Either<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Either<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1211,0 +1225,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -27,4 +27,8 @@ "use strict"; | ||
exports.match = exports.foldW = exports.matchW = exports.isRight = exports.isLeft = exports.fromOption = exports.fromPredicate = exports.FromEither = exports.MonadThrow = exports.throwError = exports.ChainRec = exports.Extend = exports.extend = exports.Alt = exports.alt = exports.altW = exports.Bifunctor = exports.mapLeft = exports.bimap = exports.Traversable = exports.sequence = exports.traverse = exports.Foldable = exports.reduceRight = exports.foldMap = exports.reduce = exports.Monad = exports.Chain = exports.Applicative = exports.Apply = exports.ap = exports.apW = exports.Pointed = exports.of = exports.asUnit = exports.as = exports.Functor = exports.map = exports.getAltValidation = exports.getApplicativeValidation = exports.getWitherable = exports.getFilterable = exports.getCompactable = exports.getSemigroup = exports.getEq = exports.getShow = exports.URI = exports.flatMap = exports.right = exports.left = void 0; | ||
exports.chainFirstW = exports.chainFirst = exports.chain = exports.chainW = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.exists = exports.elem = exports.toError = exports.toUnion = exports.chainNullableK = exports.fromNullableK = exports.tryCatchK = exports.tryCatch = exports.fromNullable = exports.orElse = exports.orElseW = exports.swap = exports.filterOrElseW = exports.filterOrElse = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.duplicate = exports.flatten = exports.flattenW = exports.tap = exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.flap = exports.getOrElse = exports.getOrElseW = exports.fold = void 0; | ||
exports.getValidation = exports.getValidationMonoid = exports.getValidationSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.either = exports.stringifyJSON = exports.parseJSON = void 0; | ||
exports.either = exports.stringifyJSON = exports.chainFirstW = exports.chainFirst = exports.chain = exports.chainW = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.exists = exports.toUnion = exports.chainNullableK = exports.fromNullableK = exports.tryCatchK = exports.tryCatch = exports.fromNullable = exports.orElse = exports.orElseW = exports.swap = exports.filterOrElseW = exports.filterOrElse = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.duplicate = exports.flatten = exports.flattenW = exports.tap = exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.flap = exports.getOrElse = exports.getOrElseW = exports.fold = void 0; | ||
exports.getValidationMonoid = exports.getValidationSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = void 0; | ||
exports.toError = toError; | ||
exports.elem = elem; | ||
exports.parseJSON = parseJSON; | ||
exports.getValidation = getValidation; | ||
var Applicative_1 = require("./Applicative"); | ||
@@ -1247,3 +1251,2 @@ var Apply_1 = require("./Apply"); | ||
} | ||
exports.toError = toError; | ||
function elem(E) { | ||
@@ -1258,3 +1261,2 @@ return function (a, ma) { | ||
} | ||
exports.elem = elem; | ||
/** | ||
@@ -1427,3 +1429,2 @@ * Returns `false` if `Left` or returns the result of the application of the given predicate to the `Right` value. | ||
} | ||
exports.parseJSON = parseJSON; | ||
/** | ||
@@ -1546,2 +1547,1 @@ * Use [`stringify`](./Json.ts.html#stringify) instead. | ||
} | ||
exports.getValidation = getValidation; |
@@ -26,3 +26,29 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getEitherM = exports.toUnion = exports.swap = exports.orLeft = exports.tapError = exports.orElseFirst = exports.orElse = exports.getOrElse = exports.matchE = exports.match = exports.altValidation = exports.mapError = exports.mapLeft = exports.mapBoth = exports.bimap = exports.alt = exports.flatMap = exports.chain = exports.ap = exports.map = exports.chainNullableK = exports.fromNullableK = exports.fromNullable = exports.leftF = exports.rightF = exports.left = exports.right = void 0; | ||
exports.right = right; | ||
exports.left = left; | ||
exports.rightF = rightF; | ||
exports.leftF = leftF; | ||
exports.fromNullable = fromNullable; | ||
exports.fromNullableK = fromNullableK; | ||
exports.chainNullableK = chainNullableK; | ||
exports.map = map; | ||
exports.ap = ap; | ||
exports.chain = chain; | ||
exports.flatMap = flatMap; | ||
exports.alt = alt; | ||
exports.bimap = bimap; | ||
exports.mapBoth = mapBoth; | ||
exports.mapLeft = mapLeft; | ||
exports.mapError = mapError; | ||
exports.altValidation = altValidation; | ||
exports.match = match; | ||
exports.matchE = matchE; | ||
exports.getOrElse = getOrElse; | ||
exports.orElse = orElse; | ||
exports.orElseFirst = orElseFirst; | ||
exports.tapError = tapError; | ||
exports.orLeft = orLeft; | ||
exports.swap = swap; | ||
exports.toUnion = toUnion; | ||
exports.getEitherM = getEitherM; | ||
var Apply_1 = require("./Apply"); | ||
@@ -35,19 +61,14 @@ var E = __importStar(require("./Either")); | ||
} | ||
exports.right = right; | ||
function left(F) { | ||
return (0, function_1.flow)(E.left, F.of); | ||
} | ||
exports.left = left; | ||
function rightF(F) { | ||
return function (fa) { return F.map(fa, E.right); }; | ||
} | ||
exports.rightF = rightF; | ||
function leftF(F) { | ||
return function (fe) { return F.map(fe, E.left); }; | ||
} | ||
exports.leftF = leftF; | ||
function fromNullable(F) { | ||
return function (e) { return (0, function_1.flow)(E.fromNullable(e), F.of); }; | ||
} | ||
exports.fromNullable = fromNullable; | ||
function fromNullableK(F) { | ||
@@ -60,3 +81,2 @@ var fromNullableF = fromNullable(F); | ||
} | ||
exports.fromNullableK = fromNullableK; | ||
function chainNullableK(M) { | ||
@@ -70,11 +90,8 @@ var chainM = chain(M); | ||
} | ||
exports.chainNullableK = chainNullableK; | ||
function map(F) { | ||
return (0, Functor_1.map)(F, E.Functor); | ||
} | ||
exports.map = map; | ||
function ap(F) { | ||
return (0, Apply_1.ap)(F, E.Apply); | ||
} | ||
exports.ap = ap; | ||
function chain(M) { | ||
@@ -84,3 +101,2 @@ var flatMapM = flatMap(M); | ||
} | ||
exports.chain = chain; | ||
/** @internal */ | ||
@@ -90,7 +106,5 @@ function flatMap(M) { | ||
} | ||
exports.flatMap = flatMap; | ||
function alt(M) { | ||
return function (second) { return function (first) { return M.chain(first, function (e) { return (E.isLeft(e) ? second() : M.of(e)); }); }; }; | ||
} | ||
exports.alt = alt; | ||
function bimap(F) { | ||
@@ -100,3 +114,2 @@ var mapBothF = mapBoth(F); | ||
} | ||
exports.bimap = bimap; | ||
/** @internal */ | ||
@@ -106,3 +119,2 @@ function mapBoth(F) { | ||
} | ||
exports.mapBoth = mapBoth; | ||
function mapLeft(F) { | ||
@@ -112,3 +124,2 @@ var mapErrorF = mapError(F); | ||
} | ||
exports.mapLeft = mapLeft; | ||
/** @internal */ | ||
@@ -118,3 +129,2 @@ function mapError(F) { | ||
} | ||
exports.mapError = mapError; | ||
function altValidation(M, S) { | ||
@@ -127,19 +137,14 @@ return function (second) { return function (first) { | ||
} | ||
exports.altValidation = altValidation; | ||
function match(F) { | ||
return function (onLeft, onRight) { return function (ma) { return F.map(ma, E.match(onLeft, onRight)); }; }; | ||
} | ||
exports.match = match; | ||
function matchE(M) { | ||
return function (onLeft, onRight) { return function (ma) { return M.chain(ma, E.match(onLeft, onRight)); }; }; | ||
} | ||
exports.matchE = matchE; | ||
function getOrElse(M) { | ||
return function (onLeft) { return function (ma) { return M.chain(ma, E.match(onLeft, M.of)); }; }; | ||
} | ||
exports.getOrElse = getOrElse; | ||
function orElse(M) { | ||
return function (onLeft) { return function (ma) { return M.chain(ma, function (e) { return (E.isLeft(e) ? onLeft(e.left) : M.of(e)); }); }; }; | ||
} | ||
exports.orElse = orElse; | ||
function orElseFirst(M) { | ||
@@ -149,3 +154,2 @@ var tapErrorM = tapError(M); | ||
} | ||
exports.orElseFirst = orElseFirst; | ||
/** @internal */ | ||
@@ -158,3 +162,2 @@ function tapError(M) { | ||
} | ||
exports.tapError = tapError; | ||
function orLeft(M) { | ||
@@ -165,11 +168,8 @@ return function (onLeft) { return function (ma) { | ||
} | ||
exports.orLeft = orLeft; | ||
function swap(F) { | ||
return function (ma) { return F.map(ma, E.swap); }; | ||
} | ||
exports.swap = swap; | ||
function toUnion(F) { | ||
return function (fa) { return F.map(fa, E.toUnion); }; | ||
} | ||
exports.toUnion = toUnion; | ||
/** @deprecated */ | ||
@@ -204,2 +204,1 @@ /* istanbul ignore next */ | ||
} | ||
exports.getEitherM = getEitherM; |
@@ -27,7 +27,7 @@ /** | ||
*/ | ||
export declare const fromEquals: <A>(equals: (x: A, y: A) => boolean) => Eq<A> | ||
export declare const fromEquals: <A>(equals: Eq<A>['equals']) => Eq<A> | ||
/** | ||
* @since 2.10.0 | ||
*/ | ||
export declare const struct: <A>(eqs: { [K in keyof A]: Eq<A[K]> }) => Eq<{ readonly [K_1 in keyof A]: A[K_1] }> | ||
export declare const struct: <A>(eqs: { [K in keyof A]: Eq<A[K]> }) => Eq<{ readonly [K in keyof A]: A[K] }> | ||
/** | ||
@@ -50,3 +50,3 @@ * Given a tuple of `Eq`s returns a `Eq` for the tuple | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>(...eqs: { [K in keyof A]: Eq<A[K]> }) => Eq<Readonly<A>> | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>(...eqs: { [K in keyof A]: Eq<A[K]> }) => Eq<Readonly<A>> | ||
/** | ||
@@ -53,0 +53,0 @@ * A typical use case for `contramap` would be like, given some `User` type, to construct an `Eq<User>`. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fieldNumber = exports.lcm = exports.gcd = void 0; | ||
exports.fieldNumber = void 0; | ||
exports.gcd = gcd; | ||
exports.lcm = lcm; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -17,3 +19,2 @@ // utils | ||
} | ||
exports.gcd = gcd; | ||
/** | ||
@@ -29,3 +30,2 @@ * The *least common multiple* of two values | ||
} | ||
exports.lcm = lcm; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -32,0 +32,0 @@ // deprecated |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getFilterableComposition = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = void 0; | ||
exports.filter = filter; | ||
exports.filterMap = filterMap; | ||
exports.partition = partition; | ||
exports.partitionMap = partitionMap; | ||
exports.getFilterableComposition = getFilterableComposition; | ||
/** | ||
@@ -20,7 +24,5 @@ * `Filterable` represents data structures which can be _partitioned_/_filtered_. | ||
} | ||
exports.filter = filter; | ||
function filterMap(F, G) { | ||
return function (f) { return function (fga) { return F.map(fga, function (ga) { return G.filterMap(ga, f); }); }; }; | ||
} | ||
exports.filterMap = filterMap; | ||
function partition(F, G) { | ||
@@ -34,3 +36,2 @@ var _filter = filter(F, G); | ||
} | ||
exports.partition = partition; | ||
function partitionMap(F, G) { | ||
@@ -42,3 +43,2 @@ var _filterMap = filterMap(F, G); | ||
} | ||
exports.partitionMap = partitionMap; | ||
/** @deprecated */ | ||
@@ -63,2 +63,1 @@ function getFilterableComposition(F, G) { | ||
} | ||
exports.getFilterableComposition = getFilterableComposition; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getFoldableComposition = exports.toArray = exports.foldM = exports.traverse_ = exports.toReadonlyArray = exports.intercalate = exports.reduceM = exports.reduceRight = exports.foldMap = exports.reduce = void 0; | ||
exports.toArray = void 0; | ||
exports.reduce = reduce; | ||
exports.foldMap = foldMap; | ||
exports.reduceRight = reduceRight; | ||
exports.reduceM = reduceM; | ||
exports.intercalate = intercalate; | ||
exports.toReadonlyArray = toReadonlyArray; | ||
exports.traverse_ = traverse_; | ||
exports.foldM = foldM; | ||
exports.getFoldableComposition = getFoldableComposition; | ||
var function_1 = require("./function"); | ||
@@ -8,3 +17,2 @@ function reduce(F, G) { | ||
} | ||
exports.reduce = reduce; | ||
function foldMap(F, G) { | ||
@@ -17,11 +25,8 @@ return function (M) { | ||
} | ||
exports.foldMap = foldMap; | ||
function reduceRight(F, G) { | ||
return function (b, f) { return function (fga) { return F.reduceRight(fga, b, function (ga, b) { return G.reduceRight(ga, b, f); }); }; }; | ||
} | ||
exports.reduceRight = reduceRight; | ||
function reduceM(M, F) { | ||
return function (b, f) { return function (fa) { return F.reduce(fa, M.of(b), function (mb, a) { return M.chain(mb, function (b) { return f(b, a); }); }); }; }; | ||
} | ||
exports.reduceM = reduceM; | ||
function intercalate(M, F) { | ||
@@ -36,3 +41,2 @@ return function (middle, fm) { | ||
} | ||
exports.intercalate = intercalate; | ||
function toReadonlyArray(F) { | ||
@@ -46,3 +50,2 @@ return function (fa) { | ||
} | ||
exports.toReadonlyArray = toReadonlyArray; | ||
function traverse_(M, F) { | ||
@@ -53,7 +56,5 @@ var applyFirst = function (mu, mb) { return M.ap(M.map(mu, function_1.constant), mb); }; | ||
} | ||
exports.traverse_ = traverse_; | ||
function foldM(M, F) { | ||
return function (fa, b, f) { return F.reduce(fa, M.of(b), function (mb, a) { return M.chain(mb, function (b) { return f(b, a); }); }); }; | ||
} | ||
exports.foldM = foldM; | ||
/** | ||
@@ -81,2 +82,1 @@ * Use [`toReadonlyArray`](#toreadonlyarray) instead | ||
} | ||
exports.getFoldableComposition = getFoldableComposition; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getFoldableWithIndexComposition = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = void 0; | ||
exports.reduceWithIndex = reduceWithIndex; | ||
exports.foldMapWithIndex = foldMapWithIndex; | ||
exports.reduceRightWithIndex = reduceRightWithIndex; | ||
exports.getFoldableWithIndexComposition = getFoldableWithIndexComposition; | ||
/** | ||
@@ -23,3 +26,2 @@ * A `Foldable` with an additional index. | ||
} | ||
exports.reduceWithIndex = reduceWithIndex; | ||
function foldMapWithIndex(F, G) { | ||
@@ -32,3 +34,2 @@ return function (M) { | ||
} | ||
exports.foldMapWithIndex = foldMapWithIndex; | ||
function reduceRightWithIndex(F, G) { | ||
@@ -39,3 +40,2 @@ return function (b, f) { return function (fga) { | ||
} | ||
exports.reduceRightWithIndex = reduceRightWithIndex; | ||
/** @deprecated */ | ||
@@ -59,2 +59,1 @@ function getFoldableWithIndexComposition(F, G) { | ||
} | ||
exports.getFoldableWithIndexComposition = getFoldableWithIndexComposition; |
@@ -31,3 +31,11 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tapEither = exports.filterOrElse = exports.chainFirstEitherK = exports.chainEitherK = exports.fromEitherK = exports.chainOptionK = exports.fromOptionK = exports.fromPredicate = exports.fromOption = void 0; | ||
exports.fromOption = fromOption; | ||
exports.fromPredicate = fromPredicate; | ||
exports.fromOptionK = fromOptionK; | ||
exports.chainOptionK = chainOptionK; | ||
exports.fromEitherK = fromEitherK; | ||
exports.chainEitherK = chainEitherK; | ||
exports.chainFirstEitherK = chainFirstEitherK; | ||
exports.filterOrElse = filterOrElse; | ||
exports.tapEither = tapEither; | ||
var Chain_1 = require("./Chain"); | ||
@@ -39,3 +47,2 @@ var function_1 = require("./function"); | ||
} | ||
exports.fromOption = fromOption; | ||
function fromPredicate(F) { | ||
@@ -48,3 +55,2 @@ return function (predicate, onFalse) { | ||
} | ||
exports.fromPredicate = fromPredicate; | ||
function fromOptionK(F) { | ||
@@ -57,3 +63,2 @@ var fromOptionF = fromOption(F); | ||
} | ||
exports.fromOptionK = fromOptionK; | ||
function chainOptionK(F, M) { | ||
@@ -66,7 +71,5 @@ var fromOptionKF = fromOptionK(F); | ||
} | ||
exports.chainOptionK = chainOptionK; | ||
function fromEitherK(F) { | ||
return function (f) { return (0, function_1.flow)(f, F.fromEither); }; | ||
} | ||
exports.fromEitherK = fromEitherK; | ||
function chainEitherK(F, M) { | ||
@@ -76,3 +79,2 @@ var fromEitherKF = fromEitherK(F); | ||
} | ||
exports.chainEitherK = chainEitherK; | ||
function chainFirstEitherK(F, M) { | ||
@@ -82,3 +84,2 @@ var tapEitherM = tapEither(F, M); | ||
} | ||
exports.chainFirstEitherK = chainFirstEitherK; | ||
function filterOrElse(F, M) { | ||
@@ -91,3 +92,2 @@ return function (predicate, onFalse) { | ||
} | ||
exports.filterOrElse = filterOrElse; | ||
/** @internal */ | ||
@@ -99,2 +99,1 @@ function tapEither(F, M) { | ||
} | ||
exports.tapEither = tapEither; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tapIO = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = void 0; | ||
exports.fromIOK = fromIOK; | ||
exports.chainIOK = chainIOK; | ||
exports.chainFirstIOK = chainFirstIOK; | ||
exports.tapIO = tapIO; | ||
/** | ||
@@ -14,3 +17,2 @@ * Lift a computation from the `IO` monad | ||
} | ||
exports.fromIOK = fromIOK; | ||
function chainIOK(F, M) { | ||
@@ -22,3 +24,2 @@ return function (f) { | ||
} | ||
exports.chainIOK = chainIOK; | ||
function chainFirstIOK(F, M) { | ||
@@ -28,3 +29,2 @@ var tapIOM = tapIO(F, M); | ||
} | ||
exports.chainFirstIOK = chainFirstIOK; | ||
/** @internal */ | ||
@@ -35,2 +35,1 @@ function tapIO(F, M) { | ||
} | ||
exports.tapIO = tapIO; |
@@ -26,3 +26,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tapReader = exports.chainFirstReaderK = exports.chainReaderK = exports.fromReaderK = exports.asks = exports.ask = void 0; | ||
exports.ask = ask; | ||
exports.asks = asks; | ||
exports.fromReaderK = fromReaderK; | ||
exports.chainReaderK = chainReaderK; | ||
exports.chainFirstReaderK = chainFirstReaderK; | ||
exports.tapReader = tapReader; | ||
/** | ||
@@ -39,11 +44,8 @@ * Lift a computation from the `Reader` monad. | ||
} | ||
exports.ask = ask; | ||
function asks(F) { | ||
return F.fromReader; | ||
} | ||
exports.asks = asks; | ||
function fromReaderK(F) { | ||
return function (f) { return (0, function_1.flow)(f, F.fromReader); }; | ||
} | ||
exports.fromReaderK = fromReaderK; | ||
function chainReaderK(F, M) { | ||
@@ -53,3 +55,2 @@ var fromReaderKF = fromReaderK(F); | ||
} | ||
exports.chainReaderK = chainReaderK; | ||
function chainFirstReaderK(F, M) { | ||
@@ -59,3 +60,2 @@ var tapM = tapReader(F, M); | ||
} | ||
exports.chainFirstReaderK = chainFirstReaderK; | ||
/** @internal */ | ||
@@ -66,2 +66,1 @@ function tapReader(F, M) { | ||
} | ||
exports.tapReader = tapReader; |
@@ -26,3 +26,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.chainStateK = exports.fromStateK = exports.gets = exports.modify = exports.put = exports.get = void 0; | ||
exports.get = get; | ||
exports.put = put; | ||
exports.modify = modify; | ||
exports.gets = gets; | ||
exports.fromStateK = fromStateK; | ||
exports.chainStateK = chainStateK; | ||
var function_1 = require("./function"); | ||
@@ -33,19 +38,14 @@ var S = __importStar(require("./State")); | ||
} | ||
exports.get = get; | ||
function put(F) { | ||
return function (s) { return F.fromState(S.put(s)); }; | ||
} | ||
exports.put = put; | ||
function modify(F) { | ||
return (0, function_1.flow)(S.modify, F.fromState); | ||
} | ||
exports.modify = modify; | ||
function gets(F) { | ||
return (0, function_1.flow)(S.gets, F.fromState); | ||
} | ||
exports.gets = gets; | ||
function fromStateK(F) { | ||
return function (f) { return (0, function_1.flow)(f, F.fromState); }; | ||
} | ||
exports.fromStateK = fromStateK; | ||
function chainStateK(F, M) { | ||
@@ -55,2 +55,1 @@ var fromStateKF = fromStateK(F); | ||
} | ||
exports.chainStateK = chainStateK; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tapTask = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = void 0; | ||
exports.fromTaskK = fromTaskK; | ||
exports.chainTaskK = chainTaskK; | ||
exports.chainFirstTaskK = chainFirstTaskK; | ||
exports.tapTask = tapTask; | ||
/** | ||
@@ -14,3 +17,2 @@ * Lift a computation from the `Task` monad | ||
} | ||
exports.fromTaskK = fromTaskK; | ||
function chainTaskK(F, M) { | ||
@@ -22,3 +24,2 @@ return function (f) { | ||
} | ||
exports.chainTaskK = chainTaskK; | ||
function chainFirstTaskK(F, M) { | ||
@@ -28,3 +29,2 @@ var tapTaskM = tapTask(F, M); | ||
} | ||
exports.chainFirstTaskK = chainFirstTaskK; | ||
/** @internal */ | ||
@@ -35,2 +35,1 @@ function tapTask(F, M) { | ||
} | ||
exports.tapTask = tapTask; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fromTheseK = void 0; | ||
exports.fromTheseK = fromTheseK; | ||
/** | ||
@@ -13,2 +13,1 @@ * The `FromThese` type class represents those data types which support errors and warnings. | ||
} | ||
exports.fromTheseK = fromTheseK; |
@@ -12,3 +12,15 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.dual = exports.getEndomorphismMonoid = exports.not = exports.SK = exports.hole = exports.pipe = exports.untupled = exports.tupled = exports.absurd = exports.decrement = exports.increment = exports.tuple = exports.flow = exports.flip = exports.constVoid = exports.constUndefined = exports.constNull = exports.constFalse = exports.constTrue = exports.constant = exports.unsafeCoerce = exports.identity = exports.apply = exports.getRing = exports.getSemiring = exports.getMonoid = exports.getSemigroup = exports.getBooleanAlgebra = void 0; | ||
exports.dual = exports.getEndomorphismMonoid = exports.SK = exports.hole = exports.constVoid = exports.constUndefined = exports.constNull = exports.constFalse = exports.constTrue = exports.unsafeCoerce = exports.apply = exports.getRing = exports.getSemiring = exports.getMonoid = exports.getSemigroup = exports.getBooleanAlgebra = void 0; | ||
exports.identity = identity; | ||
exports.constant = constant; | ||
exports.flip = flip; | ||
exports.flow = flow; | ||
exports.tuple = tuple; | ||
exports.increment = increment; | ||
exports.decrement = decrement; | ||
exports.absurd = absurd; | ||
exports.tupled = tupled; | ||
exports.untupled = untupled; | ||
exports.pipe = pipe; | ||
exports.not = not; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -137,3 +149,2 @@ // instances | ||
} | ||
exports.identity = identity; | ||
/** | ||
@@ -149,3 +160,2 @@ * @since 2.0.0 | ||
} | ||
exports.constant = constant; | ||
/** | ||
@@ -193,3 +203,2 @@ * A thunk that returns always `true`. | ||
} | ||
exports.flip = flip; | ||
function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) { | ||
@@ -234,3 +243,2 @@ switch (arguments.length) { | ||
} | ||
exports.flow = flow; | ||
/** | ||
@@ -246,3 +254,2 @@ * @since 2.0.0 | ||
} | ||
exports.tuple = tuple; | ||
/** | ||
@@ -254,3 +261,2 @@ * @since 2.0.0 | ||
} | ||
exports.increment = increment; | ||
/** | ||
@@ -262,3 +268,2 @@ * @since 2.0.0 | ||
} | ||
exports.decrement = decrement; | ||
/** | ||
@@ -270,3 +275,2 @@ * @since 2.0.0 | ||
} | ||
exports.absurd = absurd; | ||
/** | ||
@@ -287,3 +291,2 @@ * Creates a tupled version of this function: instead of `n` arguments, it accepts a single tuple argument. | ||
} | ||
exports.tupled = tupled; | ||
/** | ||
@@ -303,3 +306,2 @@ * Inverse function of `tupled` | ||
} | ||
exports.untupled = untupled; | ||
function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) { | ||
@@ -334,3 +336,2 @@ switch (arguments.length) { | ||
} | ||
exports.pipe = pipe; | ||
/** | ||
@@ -357,3 +358,2 @@ * Type hole simulation | ||
} | ||
exports.not = not; | ||
/** | ||
@@ -360,0 +360,0 @@ * Use `Endomorphism` module instead. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.asUnit = exports.as = exports.getFunctorComposition = exports.let = exports.bindTo = exports.flap = exports.map = void 0; | ||
exports.map = map; | ||
exports.flap = flap; | ||
exports.bindTo = bindTo; | ||
exports.let = let_; | ||
exports.getFunctorComposition = getFunctorComposition; | ||
exports.as = as; | ||
exports.asUnit = asUnit; | ||
/** | ||
@@ -21,7 +27,5 @@ * A `Functor` is a type constructor which supports a mapping operation `map`. | ||
} | ||
exports.map = map; | ||
function flap(F) { | ||
return function (a) { return function (fab) { return F.map(fab, function (f) { return f(a); }); }; }; | ||
} | ||
exports.flap = flap; | ||
function bindTo(F) { | ||
@@ -33,3 +37,2 @@ return function (name) { return function (fa) { return F.map(fa, function (a) { | ||
} | ||
exports.bindTo = bindTo; | ||
function let_(F) { | ||
@@ -41,3 +44,2 @@ return function (name, f) { return function (fa) { return F.map(fa, function (a) { | ||
} | ||
exports.let = let_; | ||
/** @deprecated */ | ||
@@ -50,3 +52,2 @@ function getFunctorComposition(F, G) { | ||
} | ||
exports.getFunctorComposition = getFunctorComposition; | ||
/** @internal */ | ||
@@ -56,3 +57,2 @@ function as(F) { | ||
} | ||
exports.as = as; | ||
/** @internal */ | ||
@@ -63,2 +63,1 @@ function asUnit(F) { | ||
} | ||
exports.asUnit = asUnit; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getFunctorWithIndexComposition = exports.mapWithIndex = void 0; | ||
exports.mapWithIndex = mapWithIndex; | ||
exports.getFunctorWithIndexComposition = getFunctorWithIndexComposition; | ||
/** | ||
@@ -22,3 +23,2 @@ * A `FunctorWithIndex` is a type constructor which supports a mapping operation `mapWithIndex`. | ||
} | ||
exports.mapWithIndex = mapWithIndex; | ||
/** @deprecated */ | ||
@@ -33,2 +33,1 @@ function getFunctorWithIndexComposition(F, G) { | ||
} | ||
exports.getFunctorWithIndexComposition = getFunctorWithIndexComposition; |
@@ -142,3 +142,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: (a: A) => B) => B | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'Identity', (a: A) => B>) => import('./HKT').Kind<'Identity', B> | ||
/** | ||
@@ -159,3 +161,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: B) => <A>(first: A) => A | ||
export declare const apFirst: <B>( | ||
second: B | ||
) => <A>(first: import('./HKT').Kind<'Identity', A>) => import('./HKT').Kind<'Identity', A> | ||
/** | ||
@@ -166,3 +170,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: B) => <A>(first: A) => B | ||
export declare const apSecond: <B>( | ||
second: B | ||
) => <A>(first: import('./HKT').Kind<'Identity', A>) => import('./HKT').Kind<'Identity', B> | ||
/** | ||
@@ -187,3 +193,13 @@ * @category instances | ||
* | ||
* @category sequencing | ||
* @category combinators | ||
* @since 2.16.7 | ||
*/ | ||
export declare const tap: { | ||
<A, _>(self: Identity<A>, f: (a: A) => Identity<_>): Identity<A> | ||
<A, _>(f: (a: A) => Identity<_>): (self: Identity<A>) => Identity<A> | ||
} | ||
/** | ||
* Alias of `tap` | ||
* | ||
* @category legacy | ||
* @since 2.0.0 | ||
@@ -226,7 +242,11 @@ */ | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: A) => { readonly [K in N]: A } | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'Identity', A>) => import('./HKT').Kind<'Identity', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: A) => { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B } | ||
) => ( | ||
fa: import('./HKT').Kind<'Identity', A> | ||
) => import('./HKT').Kind<'Identity', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -245,4 +265,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (ma: A) => { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B } | ||
f: (a: A) => import('./HKT').Kind<'Identity', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'Identity', A> | ||
) => import('./HKT').Kind<'Identity', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -255,3 +277,5 @@ * @category do notation | ||
fb: B | ||
) => (fa: A) => { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B } | ||
) => ( | ||
fa: import('./HKT').Kind<'Identity', A> | ||
) => import('./HKT').Kind<'Identity', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -258,0 +282,0 @@ * Alias of `flatMap`. |
@@ -26,3 +26,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.identity = exports.chain = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.ChainRec = exports.Comonad = exports.Alt = exports.Traversable = exports.Foldable = exports.chainFirst = exports.Monad = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.Functor = exports.getEq = exports.getShow = exports.URI = exports.alt = exports.altW = exports.sequence = exports.traverse = exports.reduceRight = exports.foldMap = exports.reduce = exports.flatten = exports.duplicate = exports.extract = exports.extend = exports.flatMap = exports.of = exports.ap = exports.map = void 0; | ||
exports.identity = exports.chain = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.ChainRec = exports.Comonad = exports.Alt = exports.Traversable = exports.Foldable = exports.chainFirst = exports.tap = exports.Monad = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.Functor = exports.getEq = exports.getShow = exports.URI = exports.alt = exports.altW = exports.sequence = exports.traverse = exports.reduceRight = exports.foldMap = exports.reduce = exports.flatten = exports.duplicate = exports.extract = exports.extend = exports.flatMap = exports.of = exports.ap = exports.map = void 0; | ||
var Apply_1 = require("./Apply"); | ||
@@ -245,6 +245,13 @@ var Chain_1 = require("./Chain"); | ||
* | ||
* @category sequencing | ||
* @category combinators | ||
* @since 2.16.7 | ||
*/ | ||
exports.tap = (0, function_1.dual)(2, (0, Chain_1.tap)(exports.Chain)); | ||
/** | ||
* Alias of `tap` | ||
* | ||
* @category legacy | ||
* @since 2.0.0 | ||
*/ | ||
exports.chainFirst = (0, Chain_1.chainFirst)(exports.Chain); | ||
exports.chainFirst = exports.tap; | ||
/** | ||
@@ -251,0 +258,0 @@ * @category instances |
@@ -106,3 +106,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: IO<(a: A) => B>) => IO<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'IO', (a: A) => B>) => import('./HKT').Kind<'IO', B> | ||
/** | ||
@@ -123,3 +125,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: IO<B>) => <A>(first: IO<A>) => IO<A> | ||
export declare const apFirst: <B>( | ||
second: IO<B> | ||
) => <A>(first: import('./HKT').Kind<'IO', A>) => import('./HKT').Kind<'IO', A> | ||
/** | ||
@@ -130,3 +134,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: IO<B>) => <A>(first: IO<A>) => IO<B> | ||
export declare const apSecond: <B>( | ||
second: IO<B> | ||
) => <A>(first: import('./HKT').Kind<'IO', A>) => import('./HKT').Kind<'IO', B> | ||
/** | ||
@@ -188,7 +194,11 @@ * @category instances | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: IO<A>) => IO<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'IO', A>) => import('./HKT').Kind<'IO', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: IO<A>) => IO<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'IO', A> | ||
) => import('./HKT').Kind<'IO', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -207,4 +217,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => IO<B> | ||
) => (ma: IO<A>) => IO<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'IO', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'IO', A> | ||
) => import('./HKT').Kind<'IO', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -217,3 +229,5 @@ * @category do notation | ||
fb: IO<B> | ||
) => (fa: IO<A>) => IO<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'IO', A> | ||
) => import('./HKT').Kind<'IO', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -240,3 +254,3 @@ * @since 2.11.0 | ||
f: (index: number, a: A) => IO<B> | ||
) => (as: readonly A[]) => IO<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IO<ReadonlyArray<B>> | ||
/** | ||
@@ -257,3 +271,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
*/ | ||
export declare const traverseArray: <A, B>(f: (a: A) => IO<B>) => (as: readonly A[]) => IO<readonly B[]> | ||
export declare const traverseArray: <A, B>(f: (a: A) => IO<B>) => (as: ReadonlyArray<A>) => IO<ReadonlyArray<B>> | ||
/** | ||
@@ -260,0 +274,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -103,6 +103,3 @@ /** | ||
*/ | ||
export declare const fold: <E, A, B>( | ||
onLeft: (e: E) => I.IO<B>, | ||
onRight: (a: A) => I.IO<B> | ||
) => (ma: IOEither<E, A>) => I.IO<B> | ||
export declare const fold: <E, A, B>(onLeft: (e: E) => IO<B>, onRight: (a: A) => IO<B>) => (ma: IOEither<E, A>) => IO<B> | ||
/** | ||
@@ -127,5 +124,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, B, A, C>( | ||
onLeft: (e: E) => I.IO<B>, | ||
onRight: (a: A) => I.IO<C> | ||
) => (ma: IOEither<E, A>) => I.IO<B | C> | ||
onLeft: (e: E) => IO<B>, | ||
onRight: (a: A) => IO<C> | ||
) => (ma: IOEither<E, A>) => IO<B | C> | ||
/** | ||
@@ -160,3 +157,3 @@ * @category error handling | ||
*/ | ||
export declare const tryCatchK: <A extends readonly unknown[], B, E>( | ||
export declare const tryCatchK: <A extends ReadonlyArray<unknown>, B, E>( | ||
f: (...a: A) => B, | ||
@@ -374,3 +371,3 @@ onThrow: (reason: unknown) => E | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<'IOEither', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<URI, E> | ||
/** | ||
@@ -407,3 +404,5 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: IOEither<E, (a: A) => B>) => IOEither<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'IOEither', E, (a: A) => B>) => import('./HKT').Kind2<'IOEither', E, B> | ||
/** | ||
@@ -431,3 +430,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: IOEither<E, B>) => <A>(first: IOEither<E, A>) => IOEither<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: IOEither<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'IOEither', E, A>) => import('./HKT').Kind2<'IOEither', E, A> | ||
/** | ||
@@ -448,3 +449,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
*/ | ||
export declare const apSecond: <E, B>(second: IOEither<E, B>) => <A>(first: IOEither<E, A>) => IOEither<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: IOEither<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'IOEither', E, A>) => import('./HKT').Kind2<'IOEither', E, B> | ||
/** | ||
@@ -764,3 +767,3 @@ * Less strict version of [`apSecond`](#apsecond). | ||
use: (a: A) => IOEither<E, B>, | ||
release: (a: A, e: E.Either<E, B>) => IOEither<E, void> | ||
release: (a: A, e: Either<E, B>) => IOEither<E, void> | ||
) => IOEither<E, B> | ||
@@ -790,7 +793,11 @@ /** | ||
name: N | ||
) => <E, A>(fa: IOEither<E, A>) => IOEither<E, { readonly [K in N]: A }> | ||
) => <E, A>( | ||
fa: import('./HKT').Kind2<'IOEither', E, A> | ||
) => import('./HKT').Kind2<'IOEither', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: IOEither<E, A>) => IOEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'IOEither', E, A> | ||
) => import('./HKT').Kind2<'IOEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -809,4 +816,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => IOEither<E, B> | ||
) => (ma: IOEither<E, A>) => IOEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'IOEither', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'IOEither', E, A> | ||
) => import('./HKT').Kind2<'IOEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -834,3 +843,5 @@ * The `W` suffix (short for **W**idening) means that the error types will be merged. | ||
fb: IOEither<E, B> | ||
) => (fa: IOEither<E, A>) => IOEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'IOEither', E, A> | ||
) => import('./HKT').Kind2<'IOEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -874,3 +885,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => IOEither<E, B> | ||
) => (as: readonly A[]) => IOEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -893,3 +904,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => IOEither<E, B> | ||
) => (as: readonly A[]) => IOEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -912,3 +923,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => IOEither<E, B> | ||
) => (as: readonly A[]) => IOEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -938,3 +949,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
f: (a: A) => IOEither<E, B> | ||
) => (as: readonly A[]) => IOEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -941,0 +952,0 @@ * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. |
@@ -26,5 +26,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.apFirst = exports.ApplyPar = exports.Bifunctor = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getFilterable = exports.getCompactable = exports.getAltIOValidation = exports.getApplicativeIOValidation = exports.URI = exports.throwError = exports.altW = exports.alt = exports.flatten = exports.flattenW = exports.flatMap = exports.of = exports.apW = exports.ap = exports.mapLeft = exports.mapError = exports.bimap = exports.mapBoth = exports.map = exports.swap = exports.orLeft = exports.orElseFirstIOK = exports.tapError = exports.orElseW = exports.orElse = exports.toUnion = exports.tryCatchK = exports.tryCatch = exports.getOrElseW = exports.getOrElse = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromIO = exports.fromEither = exports.leftIO = exports.rightIO = exports.right = exports.left = void 0; | ||
exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.bracketW = exports.bracket = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.chainIOK = exports.flatMapIO = exports.flatMapEither = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.chainFirstIOK = exports.fromIOK = exports.MonadThrow = exports.MonadIO = exports.Alt = exports.tapIO = exports.tapEither = exports.tap = exports.FromIO = exports.FromEither = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplicativePar = exports.apSecondW = exports.apSecond = exports.apFirstW = void 0; | ||
exports.getIOValidation = exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.ioEither = exports.orElseFirstW = exports.orElseFirst = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.Applicative = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = void 0; | ||
exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.ApplyPar = exports.Bifunctor = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getCompactable = exports.URI = exports.throwError = exports.altW = exports.alt = exports.flatten = exports.flattenW = exports.flatMap = exports.of = exports.apW = exports.ap = exports.mapLeft = exports.mapError = exports.bimap = exports.mapBoth = exports.map = exports.swap = exports.orLeft = exports.orElseFirstIOK = exports.tapError = exports.orElseW = exports.orElse = exports.toUnion = exports.tryCatchK = exports.tryCatch = exports.getOrElseW = exports.getOrElse = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromIO = exports.fromEither = exports.leftIO = exports.rightIO = exports.right = exports.left = void 0; | ||
exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.bracketW = exports.bracket = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.chainIOK = exports.flatMapIO = exports.flatMapEither = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.chainFirstIOK = exports.fromIOK = exports.MonadThrow = exports.MonadIO = exports.Alt = exports.tapIO = exports.tapEither = exports.tap = exports.FromIO = exports.FromEither = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplicativePar = void 0; | ||
exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.ioEither = exports.orElseFirstW = exports.orElseFirst = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.Applicative = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = void 0; | ||
exports.getApplicativeIOValidation = getApplicativeIOValidation; | ||
exports.getAltIOValidation = getAltIOValidation; | ||
exports.getFilterable = getFilterable; | ||
exports.getIOValidation = getIOValidation; | ||
var Applicative_1 = require("./Applicative"); | ||
@@ -363,3 +367,2 @@ var Apply_1 = require("./Apply"); | ||
} | ||
exports.getApplicativeIOValidation = getApplicativeIOValidation; | ||
/** | ||
@@ -383,3 +386,2 @@ * The default [`Alt`](#alt) instance returns the last error, if you want to | ||
} | ||
exports.getAltIOValidation = getAltIOValidation; | ||
/** | ||
@@ -422,3 +424,2 @@ * @category filtering | ||
} | ||
exports.getFilterable = getFilterable; | ||
/** | ||
@@ -1106,2 +1107,1 @@ * @category instances | ||
} | ||
exports.getIOValidation = getIOValidation; |
@@ -100,3 +100,3 @@ /** | ||
*/ | ||
export declare const fold: <B, A>(onNone: () => I.IO<B>, onSome: (a: A) => I.IO<B>) => (ma: IOOption<A>) => I.IO<B> | ||
export declare const fold: <B, A>(onNone: () => IO<B>, onSome: (a: A) => IO<B>) => (ma: IOOption<A>) => IO<B> | ||
/** | ||
@@ -297,3 +297,5 @@ * Less strict version of [`matchE`](#matche). | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: IOOption<(a: A) => B>) => IOOption<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'IOOption', (a: A) => B>) => import('./HKT').Kind<'IOOption', B> | ||
/** | ||
@@ -314,3 +316,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: IOOption<B>) => <A>(first: IOOption<A>) => IOOption<A> | ||
export declare const apFirst: <B>( | ||
second: IOOption<B> | ||
) => <A>(first: import('./HKT').Kind<'IOOption', A>) => import('./HKT').Kind<'IOOption', A> | ||
/** | ||
@@ -321,3 +325,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: IOOption<B>) => <A>(first: IOOption<A>) => IOOption<B> | ||
export declare const apSecond: <B>( | ||
second: IOOption<B> | ||
) => <A>(first: import('./HKT').Kind<'IOOption', A>) => import('./HKT').Kind<'IOOption', B> | ||
/** | ||
@@ -429,3 +435,3 @@ * @category instances | ||
*/ | ||
export declare const guard: (b: boolean) => IOOption<void> | ||
export declare const guard: (b: boolean) => import('./HKT').Kind<'IOOption', void> | ||
/** | ||
@@ -544,7 +550,11 @@ * @category instances | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: IOOption<A>) => IOOption<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'IOOption', A>) => import('./HKT').Kind<'IOOption', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: IOOption<A>) => IOOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'IOOption', A> | ||
) => import('./HKT').Kind<'IOOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -563,4 +573,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => IOOption<B> | ||
) => (ma: IOOption<A>) => IOOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'IOOption', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'IOOption', A> | ||
) => import('./HKT').Kind<'IOOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -573,3 +585,5 @@ * @category do notation | ||
fb: IOOption<B> | ||
) => (fa: IOOption<A>) => IOOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'IOOption', A> | ||
) => import('./HKT').Kind<'IOOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -596,3 +610,3 @@ * @since 2.12.0 | ||
f: (index: number, a: A) => IOOption<B> | ||
) => (as: readonly A[]) => IOOption<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => IOOption<ReadonlyArray<B>> | ||
/** | ||
@@ -599,0 +613,0 @@ * Alias of `flatMap`. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.newIORef = exports.IORef = void 0; | ||
exports.IORef = void 0; | ||
exports.newIORef = newIORef; | ||
/** | ||
@@ -50,2 +51,1 @@ * @example | ||
} | ||
exports.newIORef = newIORef; |
@@ -58,2 +58,2 @@ /** | ||
*/ | ||
export declare const concatAll: <A>(M: Magma<A>) => (startWith: A) => (as: readonly A[]) => A | ||
export declare const concatAll: <A>(M: Magma<A>) => (startWith: A) => (as: ReadonlyArray<A>) => A |
@@ -63,3 +63,3 @@ import { Compactable2 } from './Compactable' | ||
*/ | ||
export declare const keys: <K>(O: Ord<K>) => <A>(m: Map<K, A>) => K[] | ||
export declare const keys: <K>(O: Ord<K>) => <A>(m: Map<K, A>) => Array<K> | ||
/** | ||
@@ -70,3 +70,3 @@ * Get a sorted `Array` of the values contained in a `Map`. | ||
*/ | ||
export declare const values: <A>(O: Ord<A>) => <K>(m: Map<K, A>) => A[] | ||
export declare const values: <A>(O: Ord<A>) => <K>(m: Map<K, A>) => Array<A> | ||
/** | ||
@@ -107,7 +107,7 @@ * @since 2.0.0 | ||
*/ | ||
export declare const updateAt: <K>(E: Eq<K>) => <A>(k: K, a: A) => (m: Map<K, A>) => O.Option<Map<K, A>> | ||
export declare const updateAt: <K>(E: Eq<K>) => <A>(k: K, a: A) => (m: Map<K, A>) => Option<Map<K, A>> | ||
/** | ||
* @since 2.0.0 | ||
*/ | ||
export declare const modifyAt: <K>(E: Eq<K>) => <A>(k: K, f: (a: A) => A) => (m: Map<K, A>) => O.Option<Map<K, A>> | ||
export declare const modifyAt: <K>(E: Eq<K>) => <A>(k: K, f: (a: A) => A) => (m: Map<K, A>) => Option<Map<K, A>> | ||
/** | ||
@@ -212,3 +212,3 @@ * Delete a key and value from a map, returning the value as well as the subsequent map | ||
*/ | ||
export declare const filterMapWithIndex: <K, A, B>(f: (k: K, a: A) => O.Option<B>) => (fa: Map<K, A>) => Map<K, B> | ||
export declare const filterMapWithIndex: <K, A, B>(f: (k: K, a: A) => Option<B>) => (fa: Map<K, A>) => Map<K, B> | ||
/** | ||
@@ -224,3 +224,3 @@ * @since 2.10.0 | ||
*/ | ||
export declare const compact: <K, A>(fa: Map<K, O.Option<A>>) => Map<K, A> | ||
export declare const compact: <K, A>(fa: Map<K, Option<A>>) => Map<K, A> | ||
/** | ||
@@ -338,3 +338,3 @@ * @category filtering | ||
*/ | ||
export declare const getFoldable: <K>(O: Ord<K>) => Foldable2C<'Map', K> | ||
export declare const getFoldable: <K>(O: Ord<K>) => Foldable2C<URI, K> | ||
/** | ||
@@ -363,3 +363,3 @@ * @category folding | ||
*/ | ||
export declare const getFoldableWithIndex: <K>(O: Ord<K>) => FoldableWithIndex2C<'Map', K, K> | ||
export declare const getFoldableWithIndex: <K>(O: Ord<K>) => FoldableWithIndex2C<URI, K, K> | ||
/** | ||
@@ -369,3 +369,3 @@ * @category traversing | ||
*/ | ||
export declare const getTraversableWithIndex: <K>(O: Ord<K>) => TraversableWithIndex2C<'Map', K, K> | ||
export declare const getTraversableWithIndex: <K>(O: Ord<K>) => TraversableWithIndex2C<URI, K, K> | ||
/** | ||
@@ -380,3 +380,3 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Map<E, (a: A) => B>) => Map<E, B> | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Kind2<'Map', E, (a: A) => B>) => Kind2<'Map', E, B> | ||
/** | ||
@@ -383,0 +383,0 @@ * @category instances |
@@ -37,4 +37,14 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getTraversableWithIndex = exports.getFoldableWithIndex = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.getFoldable = exports.reduceRight = exports.foldMap = exports.reduce = exports.getWitherable = exports.getFilterableWithIndex = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.URI = exports.separate = exports.partitionMap = exports.partition = exports.mapWithIndex = exports.map = exports.filterMap = exports.filter = exports.compact = exports.filterWithIndex = exports.filterMapWithIndex = exports.partitionWithIndex = exports.partitionMapWithIndex = exports.fromFoldable = exports.singleton = exports.getMonoid = exports.getEq = exports.isSubmap = exports.lookup = exports.lookupWithKey = exports.pop = exports.modifyAt = exports.updateAt = exports.deleteAt = exports.upsertAt = exports.toUnfoldable = exports.toArray = exports.collect = exports.values = exports.keys = exports.elem = exports.member = exports.isEmpty = exports.size = exports.getShow = void 0; | ||
exports.map_ = exports.insertAt = exports.empty = exports.difference = exports.intersection = exports.union = exports.Filterable = exports.Compactable = exports.flap = exports.Functor = void 0; | ||
exports.map_ = exports.insertAt = exports.empty = exports.difference = exports.intersection = exports.union = exports.Filterable = exports.Compactable = exports.flap = exports.Functor = exports.getTraversableWithIndex = exports.getFoldableWithIndex = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.getFoldable = exports.reduceRight = exports.foldMap = exports.reduce = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.URI = exports.separate = exports.partitionMap = exports.partition = exports.mapWithIndex = exports.map = exports.filterMap = exports.filter = exports.compact = exports.filterMapWithIndex = exports.partitionMapWithIndex = exports.singleton = exports.getEq = exports.isSubmap = exports.lookup = exports.modifyAt = exports.updateAt = exports.deleteAt = exports.upsertAt = exports.values = exports.keys = exports.elem = exports.member = exports.isEmpty = exports.size = exports.getShow = void 0; | ||
exports.collect = collect; | ||
exports.toArray = toArray; | ||
exports.toUnfoldable = toUnfoldable; | ||
exports.pop = pop; | ||
exports.lookupWithKey = lookupWithKey; | ||
exports.getMonoid = getMonoid; | ||
exports.fromFoldable = fromFoldable; | ||
exports.partitionWithIndex = partitionWithIndex; | ||
exports.filterWithIndex = filterWithIndex; | ||
exports.getFilterableWithIndex = getFilterableWithIndex; | ||
exports.getWitherable = getWitherable; | ||
var function_1 = require("./function"); | ||
@@ -117,3 +127,2 @@ var Functor_1 = require("./Functor"); | ||
} | ||
exports.collect = collect; | ||
/** | ||
@@ -127,3 +136,2 @@ * Get a sorted `Array` of the key/value pairs contained in a `Map`. | ||
} | ||
exports.toArray = toArray; | ||
function toUnfoldable(ord, U) { | ||
@@ -137,3 +145,2 @@ var toArrayO = toArray(ord); | ||
} | ||
exports.toUnfoldable = toUnfoldable; | ||
/** | ||
@@ -222,3 +229,2 @@ * Insert or replace a key/value pair in a `Map`. | ||
} | ||
exports.pop = pop; | ||
function lookupWithKey(E) { | ||
@@ -241,3 +247,2 @@ return function (k, m) { | ||
} | ||
exports.lookupWithKey = lookupWithKey; | ||
// TODO: remove non-curried overloading in v3 | ||
@@ -296,3 +301,2 @@ /** | ||
} | ||
exports.getMonoid = getMonoid; | ||
/** | ||
@@ -321,3 +325,2 @@ * Create a map with one key/value pair | ||
} | ||
exports.fromFoldable = fromFoldable; | ||
var _mapWithIndex = function (fa, f) { | ||
@@ -374,3 +377,2 @@ var m = new Map(); | ||
} | ||
exports.partitionWithIndex = partitionWithIndex; | ||
/** | ||
@@ -409,3 +411,2 @@ * @since 2.10.0 | ||
} | ||
exports.filterWithIndex = filterWithIndex; | ||
var _map = function (fa, f) { return _mapWithIndex(fa, function (_, a) { return f(a); }); }; | ||
@@ -586,3 +587,2 @@ var _filter = function (fa, p) { | ||
} | ||
exports.getFilterableWithIndex = getFilterableWithIndex; | ||
/** | ||
@@ -618,3 +618,2 @@ * @category filtering | ||
} | ||
exports.getWitherable = getWitherable; | ||
/** | ||
@@ -621,0 +620,0 @@ * @category folding |
@@ -113,5 +113,3 @@ /** | ||
*/ | ||
export declare const struct: <A>(monoids: { [K in keyof A]: Monoid<A[K]> }) => Monoid<{ | ||
readonly [K_1 in keyof A]: A[K_1] | ||
}> | ||
export declare const struct: <A>(monoids: { [K in keyof A]: Monoid<A[K]> }) => Monoid<{ readonly [K in keyof A]: A[K] }> | ||
/** | ||
@@ -134,3 +132,3 @@ * Given a tuple of monoids returns a monoid for the tuple. | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>( | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...monoids: { [K in keyof A]: Monoid<A[K]> } | ||
@@ -152,3 +150,3 @@ ) => Monoid<Readonly<A>> | ||
*/ | ||
export declare const concatAll: <A>(M: Monoid<A>) => (as: readonly A[]) => A | ||
export declare const concatAll: <A>(M: Monoid<A>) => (as: ReadonlyArray<A>) => A | ||
/** | ||
@@ -215,3 +213,3 @@ * Use [`Monoid`](./void.ts.html#monoid) instead. | ||
*/ | ||
export declare const fold: <A>(M: Monoid<A>) => (as: readonly A[]) => A | ||
export declare const fold: <A>(M: Monoid<A>) => (as: ReadonlyArray<A>) => A | ||
/** | ||
@@ -218,0 +216,0 @@ * Use [`MonoidAll`](./boolean.ts.html#monoidall) instead. |
@@ -97,3 +97,3 @@ /** | ||
*/ | ||
export declare const sortBy: <B>(ords: Ord<B>[]) => <A extends B>(as: NonEmptyArray<A>) => NonEmptyArray<A> | ||
export declare const sortBy: <B>(ords: Array<Ord<B>>) => <A extends B>(as: NonEmptyArray<A>) => NonEmptyArray<A> | ||
/** | ||
@@ -126,3 +126,3 @@ * @since 2.11.0 | ||
*/ | ||
export declare const fromArray: <A>(as: A[]) => Option<NonEmptyArray<A>> | ||
export declare const fromArray: <A>(as: Array<A>) => Option<NonEmptyArray<A>> | ||
/** | ||
@@ -158,3 +158,3 @@ * Return a `NonEmptyArray` of length `n` with element `i` initialized with `f(i)`. | ||
*/ | ||
export declare const replicate: <A>(a: A) => (n: number) => RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const replicate: <A>(a: A) => (n: number) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -182,3 +182,3 @@ * Create a `NonEmptyArray` containing a range of integers, including both endpoints. | ||
*/ | ||
export declare const unprepend: <A>(as: NonEmptyArray<A>) => [A, A[]] | ||
export declare const unprepend: <A>(as: NonEmptyArray<A>) => [A, Array<A>] | ||
/** | ||
@@ -194,3 +194,3 @@ * Return the tuple of the `init` and the `last`. | ||
*/ | ||
export declare const unappend: <A>(as: NonEmptyArray<A>) => [A[], A] | ||
export declare const unappend: <A>(as: NonEmptyArray<A>) => [Array<A>, A] | ||
/** | ||
@@ -247,3 +247,3 @@ * @since 2.11.0 | ||
*/ | ||
export declare const groupBy: <A>(f: (a: A) => string) => (as: A[]) => Record<string, NonEmptyArray<A>> | ||
export declare const groupBy: <A>(f: (a: A) => string) => (as: Array<A>) => Record<string, NonEmptyArray<A>> | ||
/** | ||
@@ -256,3 +256,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const insertAt: <A>(i: number, a: A) => (as: A[]) => Option<NonEmptyArray<A>> | ||
export declare const insertAt: <A>(i: number, a: A) => (as: Array<A>) => Option<NonEmptyArray<A>> | ||
/** | ||
@@ -336,3 +336,5 @@ * @since 2.0.0 | ||
*/ | ||
export declare const chop: <A, B>(f: (as: NonEmptyArray<A>) => [B, A[]]) => (as: NonEmptyArray<A>) => NonEmptyArray<B> | ||
export declare const chop: <A, B>( | ||
f: (as: NonEmptyArray<A>) => [B, Array<A>] | ||
) => (as: NonEmptyArray<A>) => NonEmptyArray<B> | ||
/** | ||
@@ -343,3 +345,3 @@ * Splits a `NonEmptyArray` into two pieces, the first piece has max `n` elements. | ||
*/ | ||
export declare const splitAt: (n: number) => <A>(as: NonEmptyArray<A>) => [NonEmptyArray<A>, A[]] | ||
export declare const splitAt: (n: number) => <A>(as: NonEmptyArray<A>) => [NonEmptyArray<A>, Array<A>] | ||
/** | ||
@@ -369,3 +371,3 @@ * @since 2.10.0 | ||
*/ | ||
export declare const altW: <B>(that: LazyArg<NonEmptyArray<B>>) => <A>(as: NonEmptyArray<A>) => NonEmptyArray<B | A> | ||
export declare const altW: <B>(that: LazyArg<NonEmptyArray<B>>) => <A>(as: NonEmptyArray<A>) => NonEmptyArray<A | B> | ||
/** | ||
@@ -510,3 +512,3 @@ * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to | ||
*/ | ||
export declare const getSemigroup: <A = never>() => Se.Semigroup<NonEmptyArray<A>> | ||
export declare const getSemigroup: <A = never>() => Semigroup<NonEmptyArray<A>> | ||
/** | ||
@@ -528,3 +530,3 @@ * @example | ||
*/ | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Se.Semigroup<NonEmptyArray<A>> | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Semigroup<NonEmptyArray<A>> | ||
/** | ||
@@ -539,3 +541,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: NonEmptyArray<(a: A) => B>) => NonEmptyArray<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'NonEmptyArray', (a: A) => B>) => import('./HKT').Kind<'NonEmptyArray', B> | ||
/** | ||
@@ -561,3 +565,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: NonEmptyArray<B>) => <A>(first: NonEmptyArray<A>) => NonEmptyArray<A> | ||
export declare const apFirst: <B>( | ||
second: NonEmptyArray<B> | ||
) => <A>(first: import('./HKT').Kind<'NonEmptyArray', A>) => import('./HKT').Kind<'NonEmptyArray', A> | ||
/** | ||
@@ -568,3 +574,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: NonEmptyArray<B>) => <A>(first: NonEmptyArray<A>) => NonEmptyArray<B> | ||
export declare const apSecond: <B>( | ||
second: NonEmptyArray<B> | ||
) => <A>(first: import('./HKT').Kind<'NonEmptyArray', A>) => import('./HKT').Kind<'NonEmptyArray', B> | ||
/** | ||
@@ -634,7 +642,11 @@ * @category instances | ||
name: N | ||
) => <A>(fa: NonEmptyArray<A>) => NonEmptyArray<{ readonly [K in N]: A }> | ||
) => <A>( | ||
fa: import('./HKT').Kind<'NonEmptyArray', A> | ||
) => import('./HKT').Kind<'NonEmptyArray', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: NonEmptyArray<A>) => NonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'NonEmptyArray', A> | ||
) => import('./HKT').Kind<'NonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -653,4 +665,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => NonEmptyArray<B> | ||
) => (ma: NonEmptyArray<A>) => NonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'NonEmptyArray', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'NonEmptyArray', A> | ||
) => import('./HKT').Kind<'NonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -663,3 +677,5 @@ * @category do notation | ||
fb: NonEmptyArray<B> | ||
) => (fa: NonEmptyArray<A>) => NonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'NonEmptyArray', A> | ||
) => import('./HKT').Kind<'NonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -672,3 +688,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const tail: <A>(as: NonEmptyArray<A>) => A[] | ||
export declare const tail: <A>(as: NonEmptyArray<A>) => Array<A> | ||
/** | ||
@@ -689,3 +705,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const init: <A>(as: NonEmptyArray<A>) => A[] | ||
export declare const init: <A>(as: NonEmptyArray<A>) => Array<A> | ||
/** | ||
@@ -702,3 +718,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const concatAll: <A>(S: Se.Semigroup<A>) => (as: NonEmptyArray<A>) => A | ||
export declare const concatAll: <A>(S: Semigroup<A>) => (as: NonEmptyArray<A>) => A | ||
/** | ||
@@ -710,3 +726,3 @@ * Break an `Array` into its first element and remaining elements. | ||
*/ | ||
export declare const matchLeft: <A, B>(f: (head: A, tail: A[]) => B) => (as: NonEmptyArray<A>) => B | ||
export declare const matchLeft: <A, B>(f: (head: A, tail: Array<A>) => B) => (as: NonEmptyArray<A>) => B | ||
/** | ||
@@ -718,3 +734,3 @@ * Break an `Array` into its initial elements and the last element. | ||
*/ | ||
export declare const matchRight: <A, B>(f: (init: A[], last: A) => B) => (as: NonEmptyArray<A>) => B | ||
export declare const matchRight: <A, B>(f: (init: Array<A>, last: A) => B) => (as: NonEmptyArray<A>) => B | ||
/** | ||
@@ -831,3 +847,3 @@ * Apply a function to the head, creating a new `NonEmptyArray`. | ||
*/ | ||
export declare const snoc: <A>(init: A[], end: A) => NonEmptyArray<A> | ||
export declare const snoc: <A>(init: Array<A>, end: A) => NonEmptyArray<A> | ||
/** | ||
@@ -834,0 +850,0 @@ * Use [`prependAll`](#prependall) instead. |
@@ -35,5 +35,12 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mapWithIndex = exports.map = exports.flatten = exports.duplicate = exports.extend = exports.flatMap = exports.ap = exports.alt = exports.altW = exports.chunksOf = exports.splitAt = exports.chop = exports.chainWithIndex = exports.foldMap = exports.foldMapWithIndex = exports.intersperse = exports.prependAll = exports.unzip = exports.zip = exports.zipWith = exports.of = exports.copy = exports.modifyAt = exports.updateAt = exports.insertAt = exports.sort = exports.groupBy = exports.group = exports.reverse = exports.concat = exports.concatW = exports.unappend = exports.unprepend = exports.range = exports.replicate = exports.makeBy = exports.fromArray = exports.fromReadonlyNonEmptyArray = exports.rotate = exports.union = exports.sortBy = exports.uniq = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.append = exports.appendW = exports.prepend = exports.prependW = exports.isOutOfBound = exports.isNonEmpty = void 0; | ||
exports.chain = exports.intercalate = exports.updateLast = exports.modifyLast = exports.updateHead = exports.modifyHead = exports.matchRight = exports.matchLeft = exports.concatAll = exports.max = exports.min = exports.init = exports.last = exports.tail = exports.head = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.Comonad = exports.Alt = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.Monad = exports.chainFirst = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.FunctorWithIndex = exports.Pointed = exports.flap = exports.Functor = exports.getUnionSemigroup = exports.getEq = exports.getSemigroup = exports.getShow = exports.URI = exports.extract = exports.traverseWithIndex = exports.sequence = exports.traverse = exports.reduceRightWithIndex = exports.reduceRight = exports.reduceWithIndex = exports.reduce = void 0; | ||
exports.nonEmptyArray = exports.fold = exports.prependToAll = exports.snoc = exports.cons = exports.unsnoc = exports.uncons = exports.filterWithIndex = exports.filter = exports.groupSort = void 0; | ||
exports.reduceRightWithIndex = exports.reduceRight = exports.reduceWithIndex = exports.reduce = exports.mapWithIndex = exports.map = exports.flatten = exports.duplicate = exports.extend = exports.flatMap = exports.ap = exports.alt = exports.altW = exports.chunksOf = exports.splitAt = exports.chop = exports.chainWithIndex = exports.foldMap = exports.foldMapWithIndex = exports.intersperse = exports.prependAll = exports.unzip = exports.zipWith = exports.of = exports.copy = exports.modifyAt = exports.updateAt = exports.insertAt = exports.sort = exports.groupBy = exports.reverse = exports.unappend = exports.unprepend = exports.range = exports.replicate = exports.makeBy = exports.fromArray = exports.fromReadonlyNonEmptyArray = exports.rotate = exports.union = exports.sortBy = exports.uniq = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.append = exports.appendW = exports.prepend = exports.prependW = exports.isOutOfBound = exports.isNonEmpty = void 0; | ||
exports.snoc = exports.unsnoc = exports.uncons = exports.filterWithIndex = exports.chain = exports.intercalate = exports.updateLast = exports.modifyLast = exports.updateHead = exports.modifyHead = exports.matchRight = exports.matchLeft = exports.concatAll = exports.max = exports.min = exports.init = exports.last = exports.tail = exports.head = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.Comonad = exports.Alt = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.Monad = exports.chainFirst = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.FunctorWithIndex = exports.Pointed = exports.flap = exports.Functor = exports.getUnionSemigroup = exports.getEq = exports.getSemigroup = exports.getShow = exports.URI = exports.extract = exports.traverseWithIndex = exports.sequence = exports.traverse = void 0; | ||
exports.nonEmptyArray = exports.fold = exports.prependToAll = void 0; | ||
exports.concatW = concatW; | ||
exports.concat = concat; | ||
exports.group = group; | ||
exports.zip = zip; | ||
exports.groupSort = groupSort; | ||
exports.filter = filter; | ||
exports.cons = cons; | ||
var Apply_1 = require("./Apply"); | ||
@@ -319,7 +326,5 @@ var Chain_1 = require("./Chain"); | ||
} | ||
exports.concatW = concatW; | ||
function concat(x, y) { | ||
return y ? x.concat(y) : function (y) { return y.concat(x); }; | ||
} | ||
exports.concat = concat; | ||
/** | ||
@@ -354,3 +359,2 @@ * @since 2.0.0 | ||
} | ||
exports.group = group; | ||
/** | ||
@@ -449,3 +453,2 @@ * Splits an array into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning | ||
} | ||
exports.zip = zip; | ||
/** | ||
@@ -1147,7 +1150,5 @@ * @since 2.5.1 | ||
} | ||
exports.groupSort = groupSort; | ||
function filter(predicate) { | ||
return (0, exports.filterWithIndex)(function (_, a) { return predicate(a); }); | ||
} | ||
exports.filter = filter; | ||
/** | ||
@@ -1185,3 +1186,2 @@ * Use [`filterWithIndex`](./Array.ts.html#filterwithindex) instead. | ||
} | ||
exports.cons = cons; | ||
/** | ||
@@ -1188,0 +1188,0 @@ * Use [`append`](./Array.ts.html#append) instead. |
@@ -400,3 +400,3 @@ /** | ||
*/ | ||
export declare const guard: (b: boolean) => Option<void> | ||
export declare const guard: (b: boolean) => import('./HKT').Kind<'Option', void> | ||
/** | ||
@@ -604,3 +604,3 @@ * @category instances | ||
*/ | ||
export declare const getOrElseW: <B>(onNone: LazyArg<B>) => <A>(ma: Option<A>) => B | A | ||
export declare const getOrElseW: <B>(onNone: LazyArg<B>) => <A>(ma: Option<A>) => A | B | ||
/** | ||
@@ -636,3 +636,5 @@ * Extracts the value out of the structure, if it exists. Otherwise returns the given default value | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Option<(a: A) => B>) => Option<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'Option', (a: A) => B>) => import('./HKT').Kind<'Option', B> | ||
/** | ||
@@ -643,3 +645,5 @@ * Combine two effectful actions, keeping only the result of the first. | ||
*/ | ||
export declare const apFirst: <B>(second: Option<B>) => <A>(first: Option<A>) => Option<A> | ||
export declare const apFirst: <B>( | ||
second: Option<B> | ||
) => <A>(first: import('./HKT').Kind<'Option', A>) => import('./HKT').Kind<'Option', A> | ||
/** | ||
@@ -650,3 +654,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: Option<B>) => <A>(first: Option<A>) => Option<B> | ||
export declare const apSecond: <B>( | ||
second: Option<B> | ||
) => <A>(first: import('./HKT').Kind<'Option', A>) => import('./HKT').Kind<'Option', B> | ||
/** | ||
@@ -757,3 +763,3 @@ * @category sequencing | ||
*/ | ||
export declare const tryCatchK: <A extends readonly unknown[], B>(f: (...a: A) => B) => (...a: A) => Option<B> | ||
export declare const tryCatchK: <A extends ReadonlyArray<unknown>, B>(f: (...a: A) => B) => (...a: A) => Option<B> | ||
/** | ||
@@ -939,7 +945,11 @@ * Returns a *smart constructor* from a function that returns a nullable value. | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: Option<A>) => Option<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'Option', A>) => import('./HKT').Kind<'Option', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: Option<A>) => Option<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'Option', A> | ||
) => import('./HKT').Kind<'Option', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -958,4 +968,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Option<B> | ||
) => (ma: Option<A>) => Option<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'Option', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'Option', A> | ||
) => import('./HKT').Kind<'Option', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -968,3 +980,5 @@ * @category do notation | ||
fb: Option<B> | ||
) => (fa: Option<A>) => Option<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'Option', A> | ||
) => import('./HKT').Kind<'Option', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -991,3 +1005,3 @@ * @since 2.11.0 | ||
f: (index: number, a: A) => Option<B> | ||
) => (as: readonly A[]) => Option<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Option<ReadonlyArray<B>> | ||
/** | ||
@@ -1008,3 +1022,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
*/ | ||
export declare const traverseArray: <A, B>(f: (a: A) => Option<B>) => (as: readonly A[]) => Option<readonly B[]> | ||
export declare const traverseArray: <A, B>(f: (a: A) => Option<B>) => (as: ReadonlyArray<A>) => Option<ReadonlyArray<B>> | ||
/** | ||
@@ -1011,0 +1025,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -26,5 +26,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Witherable = exports.wilt = exports.wither = exports.Traversable = exports.sequence = exports.traverse = exports.Filterable = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports.Compactable = exports.separate = exports.compact = exports.Extend = exports.extend = exports.Alternative = exports.guard = exports.Zero = exports.zero = exports.Alt = exports.alt = exports.altW = exports.orElse = exports.Foldable = exports.reduceRight = exports.foldMap = exports.reduce = exports.Monad = exports.Chain = exports.flatMap = exports.Applicative = exports.Apply = exports.ap = exports.Pointed = exports.of = exports.asUnit = exports.as = exports.Functor = exports.map = exports.getMonoid = exports.getOrd = exports.getEq = exports.getShow = exports.URI = exports.getRight = exports.getLeft = exports.fromPredicate = exports.some = exports.none = void 0; | ||
exports.getFirstMonoid = exports.getApplyMonoid = exports.getApplySemigroup = exports.option = exports.mapNullable = exports.getRefinement = exports.chainFirst = exports.chain = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.exists = exports.elem = exports.toUndefined = exports.toNullable = exports.chainNullableK = exports.fromNullableK = exports.tryCatchK = exports.tryCatch = exports.fromNullable = exports.chainFirstEitherK = exports.chainEitherK = exports.fromEitherK = exports.duplicate = exports.tapEither = exports.tap = exports.flatten = exports.apSecond = exports.apFirst = exports.flap = exports.getOrElse = exports.getOrElseW = exports.fold = exports.match = exports.foldW = exports.matchW = exports.isNone = exports.isSome = exports.FromEither = exports.fromEither = exports.MonadThrow = exports.throwError = void 0; | ||
exports.getLastMonoid = void 0; | ||
exports.throwError = exports.Witherable = exports.wilt = exports.wither = exports.Traversable = exports.sequence = exports.traverse = exports.Filterable = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports.Compactable = exports.separate = exports.compact = exports.Extend = exports.extend = exports.Alternative = exports.guard = exports.Zero = exports.zero = exports.Alt = exports.alt = exports.altW = exports.orElse = exports.Foldable = exports.reduceRight = exports.foldMap = exports.reduce = exports.Monad = exports.Chain = exports.flatMap = exports.Applicative = exports.Apply = exports.ap = exports.Pointed = exports.of = exports.asUnit = exports.as = exports.Functor = exports.map = exports.getMonoid = exports.getOrd = exports.getEq = exports.getShow = exports.URI = exports.getRight = exports.getLeft = exports.some = exports.none = void 0; | ||
exports.getLastMonoid = exports.getFirstMonoid = exports.getApplyMonoid = exports.getApplySemigroup = exports.option = exports.mapNullable = exports.chainFirst = exports.chain = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.exists = exports.toUndefined = exports.toNullable = exports.chainNullableK = exports.fromNullableK = exports.tryCatchK = exports.tryCatch = exports.fromNullable = exports.chainFirstEitherK = exports.chainEitherK = exports.fromEitherK = exports.duplicate = exports.tapEither = exports.tap = exports.flatten = exports.apSecond = exports.apFirst = exports.flap = exports.getOrElse = exports.getOrElseW = exports.fold = exports.match = exports.foldW = exports.matchW = exports.isNone = exports.isSome = exports.FromEither = exports.fromEither = exports.MonadThrow = void 0; | ||
exports.fromPredicate = fromPredicate; | ||
exports.elem = elem; | ||
exports.getRefinement = getRefinement; | ||
var Applicative_1 = require("./Applicative"); | ||
@@ -62,3 +64,2 @@ var Apply_1 = require("./Apply"); | ||
} | ||
exports.fromPredicate = fromPredicate; | ||
/** | ||
@@ -1000,3 +1001,2 @@ * Returns the `Left` value of an `Either` if possible. | ||
} | ||
exports.elem = elem; | ||
/** | ||
@@ -1161,3 +1161,2 @@ * Returns `true` if the predicate is satisfied by the wrapped value | ||
} | ||
exports.getRefinement = getRefinement; | ||
/** | ||
@@ -1164,0 +1163,0 @@ * Use [`chainNullableK`](#chainnullablek) instead. |
@@ -26,3 +26,21 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getOptionM = exports.alt = exports.flatMap = exports.chain = exports.ap = exports.map = exports.getOrElse = exports.matchE = exports.match = exports.fromEither = exports.fromPredicate = exports.chainOptionK = exports.fromOptionK = exports.chainNullableK = exports.fromNullableK = exports.fromNullable = exports.fromF = exports.zero = exports.some = void 0; | ||
exports.some = some; | ||
exports.zero = zero; | ||
exports.fromF = fromF; | ||
exports.fromNullable = fromNullable; | ||
exports.fromNullableK = fromNullableK; | ||
exports.chainNullableK = chainNullableK; | ||
exports.fromOptionK = fromOptionK; | ||
exports.chainOptionK = chainOptionK; | ||
exports.fromPredicate = fromPredicate; | ||
exports.fromEither = fromEither; | ||
exports.match = match; | ||
exports.matchE = matchE; | ||
exports.getOrElse = getOrElse; | ||
exports.map = map; | ||
exports.ap = ap; | ||
exports.chain = chain; | ||
exports.flatMap = flatMap; | ||
exports.alt = alt; | ||
exports.getOptionM = getOptionM; | ||
var Apply_1 = require("./Apply"); | ||
@@ -35,15 +53,11 @@ var function_1 = require("./function"); | ||
} | ||
exports.some = some; | ||
function zero(F) { | ||
return (0, function_1.constant)(F.of(O.none)); | ||
} | ||
exports.zero = zero; | ||
function fromF(F) { | ||
return function (ma) { return F.map(ma, O.some); }; | ||
} | ||
exports.fromF = fromF; | ||
function fromNullable(F) { | ||
return (0, function_1.flow)(O.fromNullable, F.of); | ||
} | ||
exports.fromNullable = fromNullable; | ||
function fromNullableK(F) { | ||
@@ -53,3 +67,2 @@ var fromNullableF = fromNullable(F); | ||
} | ||
exports.fromNullableK = fromNullableK; | ||
function chainNullableK(M) { | ||
@@ -60,7 +73,5 @@ var chainM = chain(M); | ||
} | ||
exports.chainNullableK = chainNullableK; | ||
function fromOptionK(F) { | ||
return function (f) { return (0, function_1.flow)(f, F.of); }; | ||
} | ||
exports.fromOptionK = fromOptionK; | ||
function chainOptionK(M) { | ||
@@ -71,3 +82,2 @@ var chainM = chain(M); | ||
} | ||
exports.chainOptionK = chainOptionK; | ||
function fromPredicate(F) { | ||
@@ -80,27 +90,20 @@ return function (predicate) { | ||
} | ||
exports.fromPredicate = fromPredicate; | ||
function fromEither(F) { | ||
return (0, function_1.flow)(O.fromEither, F.of); | ||
} | ||
exports.fromEither = fromEither; | ||
function match(F) { | ||
return function (onNone, onSome) { return function (ma) { return F.map(ma, O.match(onNone, onSome)); }; }; | ||
} | ||
exports.match = match; | ||
function matchE(M) { | ||
return function (onNone, onSome) { return function (ma) { return M.chain(ma, O.match(onNone, onSome)); }; }; | ||
} | ||
exports.matchE = matchE; | ||
function getOrElse(M) { | ||
return function (onNone) { return function (fa) { return M.chain(fa, O.match(onNone, M.of)); }; }; | ||
} | ||
exports.getOrElse = getOrElse; | ||
function map(F) { | ||
return (0, Functor_1.map)(F, O.Functor); | ||
} | ||
exports.map = map; | ||
function ap(F) { | ||
return (0, Apply_1.ap)(F, O.Apply); | ||
} | ||
exports.ap = ap; | ||
function chain(M) { | ||
@@ -110,3 +113,2 @@ var flatMapM = flatMap(M); | ||
} | ||
exports.chain = chain; | ||
/** @internal */ | ||
@@ -119,3 +121,2 @@ function flatMap(M) { | ||
} | ||
exports.flatMap = flatMap; | ||
function alt(M) { | ||
@@ -125,3 +126,2 @@ var _some = some(M); | ||
} | ||
exports.alt = alt; | ||
/** @deprecated */ | ||
@@ -148,2 +148,1 @@ function getOptionM(M) { | ||
} | ||
exports.getOptionM = getOptionM; |
@@ -28,3 +28,3 @@ /** | ||
*/ | ||
export declare const equalsDefault: <A>(compare: (first: A, second: A) => Ordering) => (x: A, y: A) => boolean | ||
export declare const equalsDefault: <A>(compare: Ord<A>['compare']) => Eq<A>['equals'] | ||
/** | ||
@@ -34,3 +34,3 @@ * @category constructors | ||
*/ | ||
export declare const fromCompare: <A>(compare: (first: A, second: A) => Ordering) => Ord<A> | ||
export declare const fromCompare: <A>(compare: Ord<A>['compare']) => Ord<A> | ||
/** | ||
@@ -52,3 +52,5 @@ * Given a tuple of `Ord`s returns an `Ord` for the tuple. | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>(...ords: { [K in keyof A]: Ord<A[K]> }) => Ord<Readonly<A>> | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...ords: { [K in keyof A]: Ord<A[K]> } | ||
) => Ord<Readonly<A>> | ||
/** | ||
@@ -55,0 +57,0 @@ * @since 2.10.0 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pipe = exports.pipeable = exports.compose = exports.promap = exports.partitionMapWithIndex = exports.partitionWithIndex = exports.filterMapWithIndex = exports.filterWithIndex = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports.alt = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.reduceRight = exports.foldMap = exports.reduce = exports.extend = exports.mapLeft = exports.bimap = exports.chain = exports.ap = exports.mapWithIndex = exports.contramap = exports.map = void 0; | ||
exports.pipe = void 0; | ||
exports.map = map; | ||
exports.contramap = contramap; | ||
exports.mapWithIndex = mapWithIndex; | ||
exports.ap = ap; | ||
exports.chain = chain; | ||
exports.bimap = bimap; | ||
exports.mapLeft = mapLeft; | ||
exports.extend = extend; | ||
exports.reduce = reduce; | ||
exports.foldMap = foldMap; | ||
exports.reduceRight = reduceRight; | ||
exports.reduceWithIndex = reduceWithIndex; | ||
exports.foldMapWithIndex = foldMapWithIndex; | ||
exports.reduceRightWithIndex = reduceRightWithIndex; | ||
exports.alt = alt; | ||
exports.filter = filter; | ||
exports.filterMap = filterMap; | ||
exports.partition = partition; | ||
exports.partitionMap = partitionMap; | ||
exports.filterWithIndex = filterWithIndex; | ||
exports.filterMapWithIndex = filterMapWithIndex; | ||
exports.partitionWithIndex = partitionWithIndex; | ||
exports.partitionMapWithIndex = partitionMapWithIndex; | ||
exports.promap = promap; | ||
exports.compose = compose; | ||
exports.pipeable = pipeable; | ||
var Apply_1 = require("./Apply"); | ||
@@ -10,35 +36,26 @@ var Chain_1 = require("./Chain"); | ||
} | ||
exports.map = map; | ||
function contramap(F) { | ||
return function (f) { return function (fa) { return F.contramap(fa, f); }; }; | ||
} | ||
exports.contramap = contramap; | ||
function mapWithIndex(F) { | ||
return function (f) { return function (fa) { return F.mapWithIndex(fa, f); }; }; | ||
} | ||
exports.mapWithIndex = mapWithIndex; | ||
function ap(F) { | ||
return function (fa) { return function (fab) { return F.ap(fab, fa); }; }; | ||
} | ||
exports.ap = ap; | ||
function chain(F) { | ||
return function (f) { return function (fa) { return F.chain(fa, f); }; }; | ||
} | ||
exports.chain = chain; | ||
function bimap(F) { | ||
return function (f, g) { return function (fea) { return F.bimap(fea, f, g); }; }; | ||
} | ||
exports.bimap = bimap; | ||
function mapLeft(F) { | ||
return function (f) { return function (fea) { return F.mapLeft(fea, f); }; }; | ||
} | ||
exports.mapLeft = mapLeft; | ||
function extend(F) { | ||
return function (f) { return function (wa) { return F.extend(wa, f); }; }; | ||
} | ||
exports.extend = extend; | ||
function reduce(F) { | ||
return function (b, f) { return function (fa) { return F.reduce(fa, b, f); }; }; | ||
} | ||
exports.reduce = reduce; | ||
function foldMap(F) { | ||
@@ -50,11 +67,8 @@ return function (M) { | ||
} | ||
exports.foldMap = foldMap; | ||
function reduceRight(F) { | ||
return function (b, f) { return function (fa) { return F.reduceRight(fa, b, f); }; }; | ||
} | ||
exports.reduceRight = reduceRight; | ||
function reduceWithIndex(F) { | ||
return function (b, f) { return function (fa) { return F.reduceWithIndex(fa, b, f); }; }; | ||
} | ||
exports.reduceWithIndex = reduceWithIndex; | ||
function foldMapWithIndex(F) { | ||
@@ -66,51 +80,38 @@ return function (M) { | ||
} | ||
exports.foldMapWithIndex = foldMapWithIndex; | ||
function reduceRightWithIndex(F) { | ||
return function (b, f) { return function (fa) { return F.reduceRightWithIndex(fa, b, f); }; }; | ||
} | ||
exports.reduceRightWithIndex = reduceRightWithIndex; | ||
function alt(F) { | ||
return function (that) { return function (fa) { return F.alt(fa, that); }; }; | ||
} | ||
exports.alt = alt; | ||
function filter(F) { | ||
return function (predicate) { return function (fa) { return F.filter(fa, predicate); }; }; | ||
} | ||
exports.filter = filter; | ||
function filterMap(F) { | ||
return function (f) { return function (fa) { return F.filterMap(fa, f); }; }; | ||
} | ||
exports.filterMap = filterMap; | ||
function partition(F) { | ||
return function (f) { return function (fa) { return F.partition(fa, f); }; }; | ||
} | ||
exports.partition = partition; | ||
function partitionMap(F) { | ||
return function (f) { return function (fa) { return F.partitionMap(fa, f); }; }; | ||
} | ||
exports.partitionMap = partitionMap; | ||
function filterWithIndex(F) { | ||
return function (predicate) { return function (fa) { return F.filterWithIndex(fa, predicate); }; }; | ||
} | ||
exports.filterWithIndex = filterWithIndex; | ||
function filterMapWithIndex(F) { | ||
return function (f) { return function (fa) { return F.filterMapWithIndex(fa, f); }; }; | ||
} | ||
exports.filterMapWithIndex = filterMapWithIndex; | ||
function partitionWithIndex(F) { | ||
return function (f) { return function (fa) { return F.partitionWithIndex(fa, f); }; }; | ||
} | ||
exports.partitionWithIndex = partitionWithIndex; | ||
function partitionMapWithIndex(F) { | ||
return function (f) { return function (fa) { return F.partitionMapWithIndex(fa, f); }; }; | ||
} | ||
exports.partitionMapWithIndex = partitionMapWithIndex; | ||
function promap(F) { | ||
return function (f, g) { return function (fbc) { return F.promap(fbc, f, g); }; }; | ||
} | ||
exports.promap = promap; | ||
function compose(F) { | ||
return function (ea) { return function (ab) { return F.compose(ab, ea); }; }; | ||
} | ||
exports.compose = compose; | ||
var isFunctor = function (I) { return typeof I.map === 'function'; }; | ||
@@ -223,3 +224,2 @@ var isContravariant = function (I) { return typeof I.contramap === 'function'; }; | ||
} | ||
exports.pipeable = pipeable; | ||
/** | ||
@@ -226,0 +226,0 @@ * Use [`pipe`](https://gcanti.github.io/fp-ts/modules/function.ts.html#pipe) from `function` module instead. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.randomElem = exports.randomBool = exports.randomRange = exports.randomInt = exports.random = void 0; | ||
exports.randomElem = exports.randomBool = exports.random = void 0; | ||
exports.randomInt = randomInt; | ||
exports.randomRange = randomRange; | ||
/** | ||
@@ -27,3 +29,2 @@ * @since 2.0.0 | ||
} | ||
exports.randomInt = randomInt; | ||
/** | ||
@@ -38,3 +39,2 @@ * Returns a random number between a minimum value (inclusive) and a maximum value (exclusive). It is unspecified what | ||
} | ||
exports.randomRange = randomRange; | ||
/** | ||
@@ -41,0 +41,0 @@ * Returns a random boolean value with an equal chance of being `true` or `false` |
@@ -222,3 +222,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Reader<E, (a: A) => B>) => Reader<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Reader', E, (a: A) => B>) => import('./HKT').Kind2<'Reader', E, B> | ||
/** | ||
@@ -239,3 +241,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: Reader<E, B>) => <A>(first: Reader<E, A>) => Reader<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: Reader<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'Reader', E, A>) => import('./HKT').Kind2<'Reader', E, A> | ||
/** | ||
@@ -254,3 +258,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
*/ | ||
export declare const apSecond: <E, B>(second: Reader<E, B>) => <A>(first: Reader<E, A>) => Reader<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: Reader<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'Reader', E, A>) => import('./HKT').Kind2<'Reader', E, B> | ||
/** | ||
@@ -316,7 +322,9 @@ * Less strict version of [`apSecond`](#apsecond). | ||
name: N | ||
) => <E, A>(fa: Reader<E, A>) => Reader<E, { readonly [K in N]: A }> | ||
) => <E, A>(fa: import('./HKT').Kind2<'Reader', E, A>) => import('./HKT').Kind2<'Reader', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: Reader<E, A>) => Reader<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'Reader', E, A> | ||
) => import('./HKT').Kind2<'Reader', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -335,4 +343,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Reader<E, B> | ||
) => (ma: Reader<E, A>) => Reader<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'Reader', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'Reader', E, A> | ||
) => import('./HKT').Kind2<'Reader', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -365,3 +375,5 @@ * The `W` suffix (short for **W**idening) means that the environment types will be merged. | ||
fb: Reader<E, B> | ||
) => (fa: Reader<E, A>) => Reader<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'Reader', E, A> | ||
) => import('./HKT').Kind2<'Reader', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -405,3 +417,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => Reader<R, B> | ||
) => (as: readonly A[]) => Reader<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Reader<R, ReadonlyArray<B>> | ||
/** | ||
@@ -424,3 +436,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => Reader<R, B> | ||
) => (as: readonly A[]) => Reader<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Reader<R, ReadonlyArray<B>> | ||
/** | ||
@@ -427,0 +439,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -100,5 +100,5 @@ /** | ||
export declare const fold: <R, E, A, B>( | ||
onLeft: (e: E) => R.Reader<R, B>, | ||
onRight: (a: A) => R.Reader<R, B> | ||
) => (ma: ReaderEither<R, E, A>) => R.Reader<R, B> | ||
onLeft: (e: E) => Reader<R, B>, | ||
onRight: (a: A) => Reader<R, B> | ||
) => (ma: ReaderEither<R, E, A>) => Reader<R, B> | ||
/** | ||
@@ -123,5 +123,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, R2, B, A, R3, C>( | ||
onLeft: (e: E) => R.Reader<R2, B>, | ||
onRight: (a: A) => R.Reader<R3, C> | ||
) => <R1>(ma: ReaderEither<R1, E, A>) => R.Reader<R1 & R2 & R3, B | C> | ||
onLeft: (e: E) => Reader<R2, B>, | ||
onRight: (a: A) => Reader<R3, C> | ||
) => <R1>(ma: ReaderEither<R1, E, A>) => Reader<R1 & R2 & R3, B | C> | ||
/** | ||
@@ -384,3 +384,3 @@ * @category error handling | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<'ReaderEither', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<URI, E> | ||
/** | ||
@@ -437,3 +437,7 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <R, E, B>(fab: ReaderEither<R, E, (a: A) => B>) => ReaderEither<R, E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <R, E, B>( | ||
fab: import('./HKT').Kind3<'ReaderEither', R, E, (a: A) => B> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, B> | ||
/** | ||
@@ -456,3 +460,3 @@ * @category instances | ||
second: ReaderEither<R, E, B> | ||
) => <A>(first: ReaderEither<R, E, A>) => ReaderEither<R, E, A> | ||
) => <A>(first: import('./HKT').Kind3<'ReaderEither', R, E, A>) => import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
/** | ||
@@ -475,3 +479,3 @@ * Less strict version of [`apFirst`](#apfirst) | ||
second: ReaderEither<R, E, B> | ||
) => <A>(first: ReaderEither<R, E, A>) => ReaderEither<R, E, B> | ||
) => <A>(first: import('./HKT').Kind3<'ReaderEither', R, E, A>) => import('./HKT').Kind3<'ReaderEither', R, E, B> | ||
/** | ||
@@ -839,3 +843,5 @@ * Less strict version of [`apSecond`](#apsecond) | ||
name: N | ||
) => <R, E, A>(fa: ReaderEither<R, E, A>) => ReaderEither<R, E, { readonly [K in N]: A }> | ||
) => <R, E, A>( | ||
fa: import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
@@ -845,4 +851,4 @@ name: Exclude<N, keyof A>, | ||
) => <R, E>( | ||
fa: ReaderEither<R, E, A> | ||
) => ReaderEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -861,4 +867,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReaderEither<R, E, B> | ||
) => (ma: ReaderEither<R, E, A>) => ReaderEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind3<'ReaderEither', R, E, B> | ||
) => ( | ||
ma: import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -889,3 +897,5 @@ * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. | ||
fb: ReaderEither<R, E, B> | ||
) => (fa: ReaderEither<R, E, A>) => ReaderEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind3<'ReaderEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -932,3 +942,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => ReaderEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -951,3 +961,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => ReaderEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -954,0 +964,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -26,5 +26,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getAltReaderValidation = exports.getApplicativeReaderValidation = exports.getFilterable = exports.getCompactable = exports.URI = exports.throwError = exports.altW = exports.alt = exports.flatten = exports.flattenW = exports.flatMap = exports.of = exports.apW = exports.ap = exports.mapLeft = exports.mapError = exports.bimap = exports.mapBoth = exports.map = exports.swap = exports.orLeftW = exports.orLeft = exports.tapError = exports.orElseW = exports.orElse = exports.asksReaderEither = exports.asksReaderEitherW = exports.local = exports.toUnion = exports.getOrElseW = exports.getOrElse = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromReader = exports.fromEither = exports.leftReader = exports.rightReader = exports.right = exports.left = void 0; | ||
exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainReaderKW = exports.chainReaderK = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.flatMapReader = exports.flatMapEither = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.MonadThrow = exports.chainFirstReaderKW = exports.chainFirstReaderK = exports.fromReaderK = exports.asks = exports.ask = exports.Alt = exports.Bifunctor = exports.tapReader = exports.tapEither = exports.tap = exports.FromReader = exports.FromEither = exports.Monad = exports.Chain = exports.Applicative = exports.apSecondW = exports.apSecond = exports.apFirstW = void 0; | ||
exports.getReaderValidation = exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.readerEither = exports.orElseFirstW = exports.orElseFirst = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.sequenceArray = exports.traverseArray = void 0; | ||
exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getCompactable = exports.URI = exports.throwError = exports.altW = exports.alt = exports.flatten = exports.flattenW = exports.flatMap = exports.of = exports.apW = exports.ap = exports.mapLeft = exports.mapError = exports.bimap = exports.mapBoth = exports.map = exports.swap = exports.orLeftW = exports.orLeft = exports.tapError = exports.orElseW = exports.orElse = exports.asksReaderEither = exports.asksReaderEitherW = exports.local = exports.toUnion = exports.getOrElseW = exports.getOrElse = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromReader = exports.fromEither = exports.leftReader = exports.rightReader = exports.right = exports.left = void 0; | ||
exports.chain = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainReaderKW = exports.chainReaderK = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.flatMapReader = exports.flatMapEither = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.MonadThrow = exports.chainFirstReaderKW = exports.chainFirstReaderK = exports.fromReaderK = exports.asks = exports.ask = exports.Alt = exports.Bifunctor = exports.tapReader = exports.tapEither = exports.tap = exports.FromReader = exports.FromEither = exports.Monad = exports.Chain = exports.Applicative = void 0; | ||
exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.readerEither = exports.orElseFirstW = exports.orElseFirst = exports.chainFirstW = exports.chainFirst = exports.chainW = void 0; | ||
exports.getFilterable = getFilterable; | ||
exports.getApplicativeReaderValidation = getApplicativeReaderValidation; | ||
exports.getAltReaderValidation = getAltReaderValidation; | ||
exports.getReaderValidation = getReaderValidation; | ||
var Applicative_1 = require("./Applicative"); | ||
@@ -367,3 +371,2 @@ var Apply_1 = require("./Apply"); | ||
} | ||
exports.getFilterable = getFilterable; | ||
/** | ||
@@ -388,3 +391,2 @@ * The default [`Applicative`](#applicative) instance returns the first error, if you want to | ||
} | ||
exports.getApplicativeReaderValidation = getApplicativeReaderValidation; | ||
/** | ||
@@ -408,3 +410,2 @@ * The default [`Alt`](#alt) instance returns the last error, if you want to | ||
} | ||
exports.getAltReaderValidation = getAltReaderValidation; | ||
/** | ||
@@ -992,2 +993,1 @@ * @category instances | ||
} | ||
exports.getReaderValidation = getReaderValidation; |
@@ -148,3 +148,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: ReaderIO<E, (a: A) => B>) => ReaderIO<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'ReaderIO', E, (a: A) => B>) => import('./HKT').Kind2<'ReaderIO', E, B> | ||
/** | ||
@@ -165,3 +167,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: ReaderIO<E, B>) => <A>(first: ReaderIO<E, A>) => ReaderIO<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: ReaderIO<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'ReaderIO', E, A>) => import('./HKT').Kind2<'ReaderIO', E, A> | ||
/** | ||
@@ -172,3 +176,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <E, B>(second: ReaderIO<E, B>) => <A>(first: ReaderIO<E, A>) => ReaderIO<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: ReaderIO<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'ReaderIO', E, A>) => import('./HKT').Kind2<'ReaderIO', E, B> | ||
/** | ||
@@ -297,3 +303,3 @@ * @category instances | ||
*/ | ||
export declare const ask: <R>() => ReaderIO<R, R> | ||
export declare const ask: <R>() => import('./HKT').Kind2<'ReaderIO', R, R> | ||
/** | ||
@@ -305,3 +311,3 @@ * Projects a value from the global context in a `ReaderIO`. | ||
*/ | ||
export declare const asks: <R, A>(f: (r: R) => A) => ReaderIO<R, A> | ||
export declare const asks: <R, A>(f: (r: R) => A) => import('./HKT').Kind2<'ReaderIO', R, A> | ||
/** | ||
@@ -365,3 +371,5 @@ * @category lifting | ||
name: N | ||
) => <E, A>(fa: ReaderIO<E, A>) => ReaderIO<E, { readonly [K in N]: A }> | ||
) => <E, A>( | ||
fa: import('./HKT').Kind2<'ReaderIO', E, A> | ||
) => import('./HKT').Kind2<'ReaderIO', E, { readonly [K in N]: A }> | ||
/** | ||
@@ -373,4 +381,6 @@ * @category do notation | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReaderIO<E, B> | ||
) => (ma: ReaderIO<E, A>) => ReaderIO<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'ReaderIO', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'ReaderIO', E, A> | ||
) => import('./HKT').Kind2<'ReaderIO', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -398,3 +408,5 @@ * The `W` suffix (short for **W**idening) means that the environment types will be merged. | ||
fb: ReaderIO<E, B> | ||
) => (fa: ReaderIO<E, A>) => ReaderIO<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'ReaderIO', E, A> | ||
) => import('./HKT').Kind2<'ReaderIO', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -438,3 +450,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => ReaderIO<R, B> | ||
) => (as: readonly A[]) => ReaderIO<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderIO<R, ReadonlyArray<B>> | ||
/** | ||
@@ -457,3 +469,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => ReaderIO<R, B> | ||
) => (as: readonly A[]) => ReaderIO<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderIO<R, ReadonlyArray<B>> | ||
/** | ||
@@ -460,0 +472,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getReaderM = exports.fromNaturalTransformation = exports.fromReader = exports.flatMap = exports.chain = exports.ap = exports.map = exports.of = void 0; | ||
exports.of = of; | ||
exports.map = map; | ||
exports.ap = ap; | ||
exports.chain = chain; | ||
exports.flatMap = flatMap; | ||
exports.fromReader = fromReader; | ||
exports.fromNaturalTransformation = fromNaturalTransformation; | ||
exports.getReaderM = getReaderM; | ||
var function_1 = require("./function"); | ||
@@ -8,11 +15,8 @@ function of(F) { | ||
} | ||
exports.of = of; | ||
function map(F) { | ||
return function (f) { return function (fa) { return function (r) { return F.map(fa(r), f); }; }; }; | ||
} | ||
exports.map = map; | ||
function ap(F) { | ||
return function (fa) { return function (fab) { return function (r) { return F.ap(fab(r), fa(r)); }; }; }; | ||
} | ||
exports.ap = ap; | ||
function chain(M) { | ||
@@ -22,3 +26,2 @@ var flatMapM = flatMap(M); | ||
} | ||
exports.chain = chain; | ||
/** @internal */ | ||
@@ -28,11 +31,8 @@ function flatMap(M) { | ||
} | ||
exports.flatMap = flatMap; | ||
function fromReader(F) { | ||
return function (ma) { return (0, function_1.flow)(ma, F.of); }; | ||
} | ||
exports.fromReader = fromReader; | ||
function fromNaturalTransformation(nt) { | ||
return function (f) { return (0, function_1.flow)(f, nt); }; | ||
} | ||
exports.fromNaturalTransformation = fromNaturalTransformation; | ||
/** @deprecated */ | ||
@@ -56,2 +56,1 @@ /* istanbul ignore next */ | ||
} | ||
exports.getReaderM = getReaderM; |
@@ -164,3 +164,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: ReaderTask<E, (a: A) => B>) => ReaderTask<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'ReaderTask', E, (a: A) => B>) => import('./HKT').Kind2<'ReaderTask', E, B> | ||
/** | ||
@@ -183,3 +185,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: ReaderTask<E, B>) => <A>(first: ReaderTask<E, A>) => ReaderTask<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: ReaderTask<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'ReaderTask', E, A>) => import('./HKT').Kind2<'ReaderTask', E, A> | ||
/** | ||
@@ -190,3 +194,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <E, B>(second: ReaderTask<E, B>) => <A>(first: ReaderTask<E, A>) => ReaderTask<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: ReaderTask<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'ReaderTask', E, A>) => import('./HKT').Kind2<'ReaderTask', E, B> | ||
/** | ||
@@ -395,3 +401,3 @@ * Runs computations in parallel. | ||
*/ | ||
export declare const ask: <R>() => ReaderTask<R, R> | ||
export declare const ask: <R>() => import('./HKT').Kind2<'ReaderTask', R, R> | ||
/** | ||
@@ -403,3 +409,3 @@ * Projects a value from the global context in a `ReaderTask`. | ||
*/ | ||
export declare const asks: <R, A>(f: (r: R) => A) => ReaderTask<R, A> | ||
export declare const asks: <R, A>(f: (r: R) => A) => import('./HKT').Kind2<'ReaderTask', R, A> | ||
/** | ||
@@ -458,4 +464,4 @@ * @category lifting | ||
*/ | ||
export declare const fromReaderIOK: <A extends readonly unknown[], R, B>( | ||
f: (...a: A) => RIO.ReaderIO<R, B> | ||
export declare const fromReaderIOK: <A extends ReadonlyArray<unknown>, R, B>( | ||
f: (...a: A) => ReaderIO<R, B> | ||
) => (...a: A) => ReaderTask<R, B> | ||
@@ -533,7 +539,11 @@ /** | ||
name: N | ||
) => <E, A>(fa: ReaderTask<E, A>) => ReaderTask<E, { readonly [K in N]: A }> | ||
) => <E, A>( | ||
fa: import('./HKT').Kind2<'ReaderTask', E, A> | ||
) => import('./HKT').Kind2<'ReaderTask', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: ReaderTask<E, A>) => ReaderTask<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'ReaderTask', E, A> | ||
) => import('./HKT').Kind2<'ReaderTask', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -552,4 +562,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReaderTask<E, B> | ||
) => (ma: ReaderTask<E, A>) => ReaderTask<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'ReaderTask', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'ReaderTask', E, A> | ||
) => import('./HKT').Kind2<'ReaderTask', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -577,3 +589,5 @@ * The `W` suffix (short for **W**idening) means that the environment types will be merged. | ||
fb: ReaderTask<E, B> | ||
) => (fa: ReaderTask<E, A>) => ReaderTask<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'ReaderTask', E, A> | ||
) => import('./HKT').Kind2<'ReaderTask', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -617,3 +631,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => ReaderTask<R, B> | ||
) => (as: readonly A[]) => ReaderTask<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTask<R, ReadonlyArray<B>> | ||
/** | ||
@@ -636,3 +650,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => ReaderTask<R, B> | ||
) => (as: readonly A[]) => ReaderTask<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTask<R, ReadonlyArray<B>> | ||
/** | ||
@@ -655,3 +669,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => ReaderTask<R, B> | ||
) => (as: readonly A[]) => ReaderTask<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTask<R, ReadonlyArray<B>> | ||
/** | ||
@@ -681,3 +695,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
f: (a: A) => ReaderTask<R, B> | ||
) => (as: readonly A[]) => ReaderTask<R, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTask<R, ReadonlyArray<B>> | ||
/** | ||
@@ -684,0 +698,0 @@ * Alias of `flatMap`. |
@@ -27,3 +27,4 @@ "use strict"; | ||
exports.chainReaderKW = exports.chainReaderK = exports.fromReaderK = exports.asks = exports.ask = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.tapReaderIO = exports.tapTask = exports.tapReader = exports.tapIO = exports.tap = exports.flatMapReaderIO = exports.flatMapReader = exports.flatMapTask = exports.flatMapIO = exports.FromReader = exports.FromTask = exports.FromIO = exports.MonadTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecond = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.URI = exports.flatten = exports.flattenW = exports.flatMap = exports.of = exports.apW = exports.ap = exports.map = exports.asksReaderTask = exports.asksReaderTaskW = exports.local = exports.fromReaderIO = exports.fromIO = exports.fromTask = exports.fromReader = void 0; | ||
exports.run = exports.getMonoid = exports.getSemigroup = exports.readerTaskSeq = exports.readerTask = exports.sequenceSeqArray = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.chainFirstReaderIOK = exports.chainFirstReaderIOKW = exports.chainReaderIOK = exports.chainReaderIOKW = exports.fromReaderIOK = exports.chainFirstReaderKW = exports.chainFirstReaderK = void 0; | ||
exports.getMonoid = exports.getSemigroup = exports.readerTaskSeq = exports.readerTask = exports.sequenceSeqArray = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.chainFirstReaderIOK = exports.chainFirstReaderIOKW = exports.chainReaderIOK = exports.chainReaderIOKW = exports.fromReaderIOK = exports.chainFirstReaderKW = exports.chainFirstReaderK = void 0; | ||
exports.run = run; | ||
/** | ||
@@ -796,2 +797,1 @@ * @since 2.3.0 | ||
} | ||
exports.run = run; |
@@ -182,5 +182,5 @@ /** | ||
export declare const fold: <R, E, A, B>( | ||
onLeft: (e: E) => RT.ReaderTask<R, B>, | ||
onRight: (a: A) => RT.ReaderTask<R, B> | ||
) => (ma: ReaderTaskEither<R, E, A>) => RT.ReaderTask<R, B> | ||
onLeft: (e: E) => ReaderTask<R, B>, | ||
onRight: (a: A) => ReaderTask<R, B> | ||
) => (ma: ReaderTaskEither<R, E, A>) => ReaderTask<R, B> | ||
/** | ||
@@ -205,5 +205,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, R2, B, A, R3, C>( | ||
onLeft: (e: E) => RT.ReaderTask<R2, B>, | ||
onRight: (a: A) => RT.ReaderTask<R3, C> | ||
) => <R1>(ma: ReaderTaskEither<R1, E, A>) => RT.ReaderTask<R1 & R2 & R3, B | C> | ||
onLeft: (e: E) => ReaderTask<R2, B>, | ||
onRight: (a: A) => ReaderTask<R3, C> | ||
) => <R1>(ma: ReaderTaskEither<R1, E, A>) => ReaderTask<R1 & R2 & R3, B | C> | ||
/** | ||
@@ -343,3 +343,3 @@ * @category error handling | ||
*/ | ||
export declare const fromIOEitherK: <E, A extends readonly unknown[], B>( | ||
export declare const fromIOEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => IOEither<E, B> | ||
@@ -351,4 +351,4 @@ ) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, B> | ||
*/ | ||
export declare const fromTaskEitherK: <E, A extends readonly unknown[], B>( | ||
f: (...a: A) => TE.TaskEither<E, B> | ||
export declare const fromTaskEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => TaskEither<E, B> | ||
) => <R = unknown>(...a: A) => ReaderTaskEither<R, E, B> | ||
@@ -359,3 +359,3 @@ /** | ||
*/ | ||
export declare const fromReaderEitherK: <R, E, A extends readonly unknown[], B>( | ||
export declare const fromReaderEitherK: <R, E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => ReaderEither<R, E, B> | ||
@@ -534,3 +534,3 @@ ) => (...a: A) => ReaderTaskEither<R, E, B> | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<'ReaderTaskEither', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable3C<URI, E> | ||
/** | ||
@@ -587,3 +587,7 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <R, E, B>(fab: ReaderTaskEither<R, E, (a: A) => B>) => ReaderTaskEither<R, E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <R, E, B>( | ||
fab: import('./HKT').Kind3<'ReaderTaskEither', R, E, (a: A) => B> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, B> | ||
/** | ||
@@ -608,3 +612,5 @@ * @category instances | ||
second: ReaderTaskEither<R, E, B> | ||
) => <A>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A> | ||
) => <A>( | ||
first: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
/** | ||
@@ -627,3 +633,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
second: ReaderTaskEither<R, E, B> | ||
) => <A>(first: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B> | ||
) => <A>( | ||
first: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, B> | ||
/** | ||
@@ -973,4 +981,4 @@ * Less strict version of [`apSecond`](#apsecond). | ||
*/ | ||
export declare const fromReaderTaskK: <A extends readonly unknown[], R, B>( | ||
f: (...a: A) => RT.ReaderTask<R, B> | ||
export declare const fromReaderTaskK: <A extends ReadonlyArray<unknown>, R, B>( | ||
f: (...a: A) => ReaderTask<R, B> | ||
) => <E = never>(...a: A) => ReaderTaskEither<R, E, B> | ||
@@ -1003,4 +1011,4 @@ /** | ||
*/ | ||
export declare const fromReaderIOK: <A extends readonly unknown[], R, B>( | ||
f: (...a: A) => RIO.ReaderIO<R, B> | ||
export declare const fromReaderIOK: <A extends ReadonlyArray<unknown>, R, B>( | ||
f: (...a: A) => ReaderIO<R, B> | ||
) => <E = never>(...a: A) => ReaderTaskEither<R, E, B> | ||
@@ -1492,3 +1500,5 @@ /** | ||
name: N | ||
) => <R, E, A>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, { readonly [K in N]: A }> | ||
) => <R, E, A>( | ||
fa: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
@@ -1498,4 +1508,4 @@ name: Exclude<N, keyof A>, | ||
) => <R, E>( | ||
fa: ReaderTaskEither<R, E, A> | ||
) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -1514,6 +1524,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReaderTaskEither<R, E, B> | ||
f: (a: A) => import('./HKT').Kind3<'ReaderTaskEither', R, E, B> | ||
) => ( | ||
ma: ReaderTaskEither<R, E, A> | ||
) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
ma: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1545,4 +1555,4 @@ * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. | ||
) => ( | ||
fa: ReaderTaskEither<R, E, A> | ||
) => ReaderTaskEither<R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind3<'ReaderTaskEither', R, E, A> | ||
) => import('./HKT').Kind3<'ReaderTaskEither', R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1589,3 +1599,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => ReaderTaskEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1608,3 +1618,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => ReaderTaskEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1627,3 +1637,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => ReaderTaskEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1655,3 +1665,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
f: (a: A) => ReaderTaskEither<R, E, B> | ||
) => (as: readonly A[]) => ReaderTaskEither<R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => ReaderTaskEither<R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1658,0 +1668,0 @@ * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. |
@@ -27,5 +27,12 @@ "use strict"; | ||
exports.apW = exports.ap = exports.mapLeft = exports.mapError = exports.bimap = exports.mapBoth = exports.map = exports.fromReaderEitherK = exports.fromTaskEitherK = exports.fromIOEitherK = exports.swap = exports.orLeftW = exports.orLeft = exports.tapError = exports.orElseW = exports.orElse = exports.asksReaderTaskEither = exports.asksReaderTaskEitherW = exports.local = exports.chainNullableK = exports.fromNullableK = exports.fromNullable = exports.toUnion = exports.getOrElseW = exports.getOrElse = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromReaderEither = exports.fromIOEither = exports.fromTask = exports.fromIO = exports.fromReader = exports.fromEither = exports.leftReaderIO = exports.rightReaderIO = exports.leftIO = exports.rightIO = exports.leftReaderTask = exports.rightReaderTask = exports.leftReader = exports.rightReader = exports.leftTask = exports.rightTask = exports.right = exports.left = exports.fromTaskEither = void 0; | ||
exports.chainFirstReaderKW = exports.chainFirstReaderK = exports.fromReaderK = exports.asks = exports.ask = exports.Alt = exports.Bifunctor = exports.tapReaderIO = exports.tapReaderTask = exports.tapTaskEither = exports.tapReaderEither = exports.tapReader = exports.tapTask = exports.tapIO = exports.tapEither = exports.tap = exports.FromReader = exports.FromTask = exports.FromIO = exports.FromEither = exports.MonadThrow = exports.MonadTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getAltReaderTaskValidation = exports.getApplicativeReaderTaskValidation = exports.getFilterable = exports.getCompactable = exports.URI = exports.throwError = exports.altW = exports.alt = exports.flatten = exports.flattenW = exports.flatMap = exports.of = void 0; | ||
exports.chainIOEitherKW = exports.chainReaderIOK = exports.chainReaderIOKW = exports.chainReaderKW = exports.chainReaderK = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainReaderTaskK = exports.chainReaderTaskKW = exports.chainTaskEitherK = exports.chainTaskEitherKW = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.flatMapReaderEither = exports.flatMapIOEither = exports.flatMapReaderIO = exports.flatMapReader = exports.flatMapTask = exports.flatMapIO = exports.flatMapReaderTask = exports.flatMapTaskEither = exports.flatMapEither = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.chainFirstReaderIOK = exports.chainFirstReaderIOKW = exports.fromReaderIOK = exports.chainFirstReaderTaskK = exports.chainFirstReaderTaskKW = exports.fromReaderTaskK = exports.chainFirstTaskEitherK = exports.chainFirstTaskEitherKW = exports.chainFirstReaderEitherK = exports.chainFirstReaderEitherKW = void 0; | ||
exports.run = exports.getReaderTaskValidation = exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.readerTaskEitherSeq = exports.readerTaskEither = exports.orElseFirstW = exports.orElseFirst = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.bracketW = exports.bracket = exports.chainReaderEitherK = exports.chainReaderEitherKW = exports.chainIOEitherK = void 0; | ||
exports.chainFirstTaskEitherKW = exports.chainFirstReaderEitherK = exports.chainFirstReaderEitherKW = exports.chainFirstReaderKW = exports.chainFirstReaderK = exports.fromReaderK = exports.asks = exports.ask = exports.Alt = exports.Bifunctor = exports.tapReaderIO = exports.tapReaderTask = exports.tapTaskEither = exports.tapReaderEither = exports.tapReader = exports.tapTask = exports.tapIO = exports.tapEither = exports.tap = exports.FromReader = exports.FromTask = exports.FromIO = exports.FromEither = exports.MonadThrow = exports.MonadTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getCompactable = exports.URI = exports.throwError = exports.altW = exports.alt = exports.flatten = exports.flattenW = exports.flatMap = exports.of = void 0; | ||
exports.chainReaderEitherK = exports.chainReaderEitherKW = exports.chainIOEitherK = exports.chainIOEitherKW = exports.chainReaderIOK = exports.chainReaderIOKW = exports.chainReaderKW = exports.chainReaderK = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainReaderTaskK = exports.chainReaderTaskKW = exports.chainTaskEitherK = exports.chainTaskEitherKW = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.flatMapReaderEither = exports.flatMapIOEither = exports.flatMapReaderIO = exports.flatMapReader = exports.flatMapTask = exports.flatMapIO = exports.flatMapReaderTask = exports.flatMapTaskEither = exports.flatMapEither = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.chainFirstReaderIOK = exports.chainFirstReaderIOKW = exports.fromReaderIOK = exports.chainFirstReaderTaskK = exports.chainFirstReaderTaskKW = exports.fromReaderTaskK = exports.chainFirstTaskEitherK = void 0; | ||
exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.readerTaskEitherSeq = exports.readerTaskEither = exports.orElseFirstW = exports.orElseFirst = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = void 0; | ||
exports.getFilterable = getFilterable; | ||
exports.getApplicativeReaderTaskValidation = getApplicativeReaderTaskValidation; | ||
exports.getAltReaderTaskValidation = getAltReaderTaskValidation; | ||
exports.bracket = bracket; | ||
exports.bracketW = bracketW; | ||
exports.getReaderTaskValidation = getReaderTaskValidation; | ||
exports.run = run; | ||
var Applicative_1 = require("./Applicative"); | ||
@@ -497,3 +504,2 @@ var Apply_1 = require("./Apply"); | ||
} | ||
exports.getFilterable = getFilterable; | ||
/** | ||
@@ -518,3 +524,2 @@ * The default [`ApplicativePar`](#applicativepar) instance returns the first error, if you want to | ||
} | ||
exports.getApplicativeReaderTaskValidation = getApplicativeReaderTaskValidation; | ||
/** | ||
@@ -538,3 +543,2 @@ * The default [`Alt`](#alt) instance returns the last error, if you want to | ||
} | ||
exports.getAltReaderTaskValidation = getAltReaderTaskValidation; | ||
/** | ||
@@ -1349,3 +1353,2 @@ * @category instances | ||
} | ||
exports.bracket = bracket; | ||
/** | ||
@@ -1361,3 +1364,2 @@ * Less strict version of [`bracket`](#bracket). | ||
} | ||
exports.bracketW = bracketW; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -1650,3 +1652,2 @@ // do notation | ||
} | ||
exports.getReaderTaskValidation = getReaderTaskValidation; | ||
/** | ||
@@ -1661,2 +1662,1 @@ * @category zone of death | ||
} | ||
exports.run = run; |
@@ -51,3 +51,3 @@ /** | ||
*/ | ||
export declare const isEmpty: <A>(as: readonly A[]) => as is readonly [] | ||
export declare const isEmpty: <A>(as: ReadonlyArray<A>) => as is readonly [] | ||
/** | ||
@@ -71,3 +71,3 @@ * Test whether a `ReadonlyArray` is non empty. | ||
*/ | ||
export declare const prepend: <A>(head: A) => (tail: readonly A[]) => RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const prepend: <A>(head: A) => (tail: ReadonlyArray<A>) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -78,3 +78,3 @@ * Less strict version of [`prepend`](#prepend). | ||
*/ | ||
export declare const prependW: <B>(head: B) => <A>(tail: readonly A[]) => RNEA.ReadonlyNonEmptyArray<B | A> | ||
export declare const prependW: <B>(head: B) => <A>(tail: ReadonlyArray<A>) => ReadonlyNonEmptyArray<A | B> | ||
/** | ||
@@ -91,3 +91,3 @@ * Append an element to the end of a `ReadonlyArray`, creating a new `ReadonlyNonEmptyArray`. | ||
*/ | ||
export declare const append: <A>(end: A) => (init: readonly A[]) => RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const append: <A>(end: A) => (init: ReadonlyArray<A>) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -98,3 +98,3 @@ * Less strict version of [`append`](#append). | ||
*/ | ||
export declare const appendW: <B>(end: B) => <A>(init: readonly A[]) => RNEA.ReadonlyNonEmptyArray<B | A> | ||
export declare const appendW: <B>(end: B) => <A>(init: ReadonlyArray<A>) => ReadonlyNonEmptyArray<A | B> | ||
/** | ||
@@ -114,3 +114,3 @@ * Return a `ReadonlyArray` of length `n` with element `i` initialized with `f(i)`. | ||
*/ | ||
export declare const makeBy: <A>(n: number, f: (i: number) => A) => readonly A[] | ||
export declare const makeBy: <A>(n: number, f: (i: number) => A) => ReadonlyArray<A> | ||
/** | ||
@@ -129,3 +129,3 @@ * Create a `ReadonlyArray` containing a value repeated the specified number of times. | ||
*/ | ||
export declare const replicate: <A>(n: number, a: A) => readonly A[] | ||
export declare const replicate: <A>(n: number, a: A) => ReadonlyArray<A> | ||
/** | ||
@@ -160,4 +160,4 @@ * @category lifting | ||
onEmpty: LazyArg<B>, | ||
onNonEmpty: (as: RNEA.ReadonlyNonEmptyArray<A>) => C | ||
) => (as: readonly A[]) => B | C | ||
onNonEmpty: (as: ReadonlyNonEmptyArray<A>) => C | ||
) => (as: ReadonlyArray<A>) => B | C | ||
/** | ||
@@ -179,4 +179,4 @@ * @category pattern matching | ||
onEmpty: LazyArg<B>, | ||
onNonEmpty: (head: A, tail: readonly A[]) => C | ||
) => (as: readonly A[]) => B | C | ||
onNonEmpty: (head: A, tail: ReadonlyArray<A>) => C | ||
) => (as: ReadonlyArray<A>) => B | C | ||
/** | ||
@@ -216,4 +216,4 @@ * Break a `ReadonlyArray` into its first element and remaining elements. | ||
onEmpty: LazyArg<B>, | ||
onNonEmpty: (init: readonly A[], last: A) => C | ||
) => (as: readonly A[]) => B | C | ||
onNonEmpty: (init: ReadonlyArray<A>, last: A) => C | ||
) => (as: ReadonlyArray<A>) => B | C | ||
/** | ||
@@ -243,3 +243,5 @@ * Break a `ReadonlyArray` into its initial elements and the last element. | ||
*/ | ||
export declare const chainWithIndex: <A, B>(f: (i: number, a: A) => readonly B[]) => (as: readonly A[]) => readonly B[] | ||
export declare const chainWithIndex: <A, B>( | ||
f: (i: number, a: A) => ReadonlyArray<B> | ||
) => (as: ReadonlyArray<A>) => ReadonlyArray<B> | ||
/** | ||
@@ -255,3 +257,3 @@ * Same as `reduce` but it carries over the intermediate steps. | ||
*/ | ||
export declare const scanLeft: <A, B>(b: B, f: (b: B, a: A) => B) => (as: readonly A[]) => RNEA.ReadonlyNonEmptyArray<B> | ||
export declare const scanLeft: <A, B>(b: B, f: (b: B, a: A) => B) => (as: ReadonlyArray<A>) => ReadonlyNonEmptyArray<B> | ||
/** | ||
@@ -267,6 +269,3 @@ * Fold an array from the right, keeping all intermediate results instead of only the final result | ||
*/ | ||
export declare const scanRight: <A, B>( | ||
b: B, | ||
f: (a: A, b: B) => B | ||
) => (as: readonly A[]) => RNEA.ReadonlyNonEmptyArray<B> | ||
export declare const scanRight: <A, B>(b: B, f: (a: A, b: B) => B) => (as: ReadonlyArray<A>) => ReadonlyNonEmptyArray<B> | ||
/** | ||
@@ -277,3 +276,3 @@ * Calculate the number of elements in a `ReadonlyArray`. | ||
*/ | ||
export declare const size: <A>(as: readonly A[]) => number | ||
export declare const size: <A>(as: ReadonlyArray<A>) => number | ||
/** | ||
@@ -312,3 +311,3 @@ * Test whether an array contains a particular index | ||
*/ | ||
export declare const head: <A>(as: readonly A[]) => Option<A> | ||
export declare const head: <A>(as: ReadonlyArray<A>) => Option<A> | ||
/** | ||
@@ -326,3 +325,3 @@ * Get the last element in an array, or `None` if the array is empty | ||
*/ | ||
export declare const last: <A>(as: readonly A[]) => Option<A> | ||
export declare const last: <A>(as: ReadonlyArray<A>) => Option<A> | ||
/** | ||
@@ -340,3 +339,3 @@ * Get all but the first element of an array, creating a new array, or `None` if the array is empty | ||
*/ | ||
export declare const tail: <A>(as: readonly A[]) => Option<readonly A[]> | ||
export declare const tail: <A>(as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -354,3 +353,3 @@ * Get all but the last element of an array, creating a new array, or `None` if the array is empty | ||
*/ | ||
export declare const init: <A>(as: readonly A[]) => Option<readonly A[]> | ||
export declare const init: <A>(as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -374,3 +373,3 @@ * Keep only a max number of elements from the start of an `ReadonlyArray`, creating a new `ReadonlyArray`. | ||
*/ | ||
export declare const takeLeft: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const takeLeft: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -394,3 +393,3 @@ * Keep only a max number of elements from the end of an `ReadonlyArray`, creating a new `ReadonlyArray`. | ||
*/ | ||
export declare const takeRight: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const takeRight: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -451,3 +450,3 @@ * Calculate the longest initial subarray for which all element satisfy the specified predicate, creating a new array | ||
*/ | ||
export declare const dropLeft: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const dropLeft: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -469,3 +468,3 @@ * Drop a max number of elements from the end of an `ReadonlyArray`, creating a new `ReadonlyArray`. | ||
*/ | ||
export declare const dropRight: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const dropRight: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -500,3 +499,3 @@ * Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new array | ||
*/ | ||
export declare const findIndex: <A>(predicate: Predicate<A>) => (as: readonly A[]) => Option<number> | ||
export declare const findIndex: <A>(predicate: Predicate<A>) => (as: ReadonlyArray<A>) => Option<number> | ||
/** | ||
@@ -540,3 +539,3 @@ * Find the first element which satisfies a predicate (or a refinement) function | ||
*/ | ||
export declare const findFirstMap: <A, B>(f: (a: A) => Option<B>) => (as: readonly A[]) => Option<B> | ||
export declare const findFirstMap: <A, B>(f: (a: A) => Option<B>) => (as: ReadonlyArray<A>) => Option<B> | ||
/** | ||
@@ -580,3 +579,3 @@ * Find the last element which satisfies a predicate function | ||
*/ | ||
export declare const findLastMap: <A, B>(f: (a: A) => Option<B>) => (as: readonly A[]) => Option<B> | ||
export declare const findLastMap: <A, B>(f: (a: A) => Option<B>) => (as: ReadonlyArray<A>) => Option<B> | ||
/** | ||
@@ -600,3 +599,3 @@ * Returns the index of the last element of the list which matches the predicate | ||
*/ | ||
export declare const findLastIndex: <A>(predicate: Predicate<A>) => (as: readonly A[]) => Option<number> | ||
export declare const findLastIndex: <A>(predicate: Predicate<A>) => (as: ReadonlyArray<A>) => Option<number> | ||
/** | ||
@@ -613,3 +612,3 @@ * Insert an element at the specified index, creating a new array, or returning `None` if the index is out of bounds | ||
*/ | ||
export declare const insertAt: <A>(i: number, a: A) => (as: readonly A[]) => Option<RNEA.ReadonlyNonEmptyArray<A>> | ||
export declare const insertAt: <A>(i: number, a: A) => (as: ReadonlyArray<A>) => Option<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -627,3 +626,3 @@ * Change the element at the specified index, creating a new array, or returning `None` if the index is out of bounds | ||
*/ | ||
export declare const updateAt: <A>(i: number, a: A) => (as: readonly A[]) => Option<readonly A[]> | ||
export declare const updateAt: <A>(i: number, a: A) => (as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -641,3 +640,3 @@ * Delete the element at the specified index, creating a new array, or returning `None` if the index is out of bounds | ||
*/ | ||
export declare const deleteAt: (i: number) => <A>(as: readonly A[]) => Option<readonly A[]> | ||
export declare const deleteAt: (i: number) => <A>(as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -657,3 +656,3 @@ * Apply a function to the element at the specified index, creating a new array, or returning `None` if the index is out | ||
*/ | ||
export declare const modifyAt: <A>(i: number, f: (a: A) => A) => (as: readonly A[]) => Option<readonly A[]> | ||
export declare const modifyAt: <A>(i: number, f: (a: A) => A) => (as: ReadonlyArray<A>) => Option<ReadonlyArray<A>> | ||
/** | ||
@@ -669,3 +668,3 @@ * Reverse an array, creating a new array | ||
*/ | ||
export declare const reverse: <A>(as: readonly A[]) => readonly A[] | ||
export declare const reverse: <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -682,3 +681,3 @@ * Extracts from an array of `Either` all the `Right` elements. All the `Right` elements are extracted in order | ||
*/ | ||
export declare const rights: <E, A>(as: readonly Either<E, A>[]) => readonly A[] | ||
export declare const rights: <E, A>(as: ReadonlyArray<Either<E, A>>) => ReadonlyArray<A> | ||
/** | ||
@@ -695,3 +694,3 @@ * Extracts from an array of `Either` all the `Left` elements. All the `Left` elements are extracted in order | ||
*/ | ||
export declare const lefts: <E, A>(as: readonly Either<E, A>[]) => readonly E[] | ||
export declare const lefts: <E, A>(as: ReadonlyArray<Either<E, A>>) => ReadonlyArray<E> | ||
/** | ||
@@ -708,3 +707,3 @@ * Sort the elements of an array in increasing order, creating a new array | ||
*/ | ||
export declare const sort: <B>(O: Ord<B>) => <A extends B>(as: readonly A[]) => readonly A[] | ||
export declare const sort: <B>(O: Ord<B>) => <A extends B>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -721,3 +720,7 @@ * Apply a function to pairs of elements at the same index in two arrays, collecting the results in a new array. If one | ||
*/ | ||
export declare const zipWith: <A, B, C>(fa: readonly A[], fb: readonly B[], f: (a: A, b: B) => C) => readonly C[] | ||
export declare const zipWith: <A, B, C>( | ||
fa: ReadonlyArray<A>, | ||
fb: ReadonlyArray<B>, | ||
f: (a: A, b: B) => C | ||
) => ReadonlyArray<C> | ||
/** | ||
@@ -747,3 +750,3 @@ * Takes two arrays and returns an array of corresponding pairs. If one input array is short, excess elements of the | ||
*/ | ||
export declare const unzip: <A, B>(as: readonly (readonly [A, B])[]) => readonly [readonly A[], readonly B[]] | ||
export declare const unzip: <A, B>(as: ReadonlyArray<readonly [A, B]>) => readonly [ReadonlyArray<A>, ReadonlyArray<B>] | ||
/** | ||
@@ -759,3 +762,3 @@ * Prepend an element to every member of an array | ||
*/ | ||
export declare const prependAll: <A>(middle: A) => (as: readonly A[]) => readonly A[] | ||
export declare const prependAll: <A>(middle: A) => (as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -771,3 +774,3 @@ * Places an element in between members of an array | ||
*/ | ||
export declare const intersperse: <A>(middle: A) => (as: readonly A[]) => readonly A[] | ||
export declare const intersperse: <A>(middle: A) => (as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -783,3 +786,3 @@ * Rotate a `ReadonlyArray` by `n` steps. | ||
*/ | ||
export declare const rotate: (n: number) => <A>(as: readonly A[]) => readonly A[] | ||
export declare const rotate: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -815,3 +818,3 @@ * Test if a value is a member of an array. Takes a `Eq<A>` as a single | ||
*/ | ||
export declare const uniq: <A>(E: Eq<A>) => (as: readonly A[]) => readonly A[] | ||
export declare const uniq: <A>(E: Eq<A>) => (as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -847,3 +850,3 @@ * Sort the elements of an array in increasing order, where elements are compared using first `ords[0]`, then `ords[1]`, | ||
*/ | ||
export declare const sortBy: <B>(ords: readonly Ord<B>[]) => <A extends B>(as: readonly A[]) => readonly A[] | ||
export declare const sortBy: <B>(ords: ReadonlyArray<Ord<B>>) => <A extends B>(as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -871,4 +874,4 @@ * A useful recursion pattern for processing a `ReadonlyArray` to produce a new `ReadonlyArray`, often used for "chopping" up the input | ||
export declare const chop: <A, B>( | ||
f: (as: RNEA.ReadonlyNonEmptyArray<A>) => readonly [B, readonly A[]] | ||
) => (as: readonly A[]) => readonly B[] | ||
f: (as: ReadonlyNonEmptyArray<A>) => readonly [B, ReadonlyArray<A>] | ||
) => (as: ReadonlyArray<A>) => ReadonlyArray<B> | ||
/** | ||
@@ -884,3 +887,3 @@ * Splits a `ReadonlyArray` into two pieces, the first piece has max `n` elements. | ||
*/ | ||
export declare const splitAt: (n: number) => <A>(as: readonly A[]) => readonly [readonly A[], readonly A[]] | ||
export declare const splitAt: (n: number) => <A>(as: ReadonlyArray<A>) => readonly [ReadonlyArray<A>, ReadonlyArray<A>] | ||
/** | ||
@@ -904,3 +907,3 @@ * Splits a `ReadonlyArray` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of | ||
*/ | ||
export declare const chunksOf: (n: number) => <A>(as: readonly A[]) => readonly RNEA.ReadonlyNonEmptyArray<A>[] | ||
export declare const chunksOf: (n: number) => <A>(as: ReadonlyArray<A>) => ReadonlyArray<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -910,5 +913,5 @@ * @category lifting | ||
*/ | ||
export declare const fromOptionK: <A extends readonly unknown[], B>( | ||
export declare const fromOptionK: <A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => Option<B> | ||
) => (...a: A) => readonly B[] | ||
) => (...a: A) => ReadonlyArray<B> | ||
/** | ||
@@ -957,3 +960,3 @@ * `ReadonlyArray` comprehension. | ||
*/ | ||
export declare const concatW: <B>(second: readonly B[]) => <A>(first: readonly A[]) => readonly (B | A)[] | ||
export declare const concatW: <B>(second: ReadonlyArray<B>) => <A>(first: ReadonlyArray<A>) => ReadonlyArray<A | B> | ||
/** | ||
@@ -1042,3 +1045,3 @@ * @since 2.11.0 | ||
*/ | ||
export declare const altW: <B>(that: LazyArg<readonly B[]>) => <A>(fa: readonly A[]) => readonly (B | A)[] | ||
export declare const altW: <B>(that: LazyArg<ReadonlyArray<B>>) => <A>(fa: ReadonlyArray<A>) => ReadonlyArray<A | B> | ||
/** | ||
@@ -1121,3 +1124,3 @@ * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to | ||
*/ | ||
export declare const separate: <A, B>(fa: readonly Either<A, B>[]) => Separated<readonly A[], readonly B[]> | ||
export declare const separate: <A, B>(fa: ReadonlyArray<Either<A, B>>) => Separated<ReadonlyArray<A>, ReadonlyArray<B>> | ||
/** | ||
@@ -1136,3 +1139,5 @@ * @category filtering | ||
*/ | ||
export declare const filterMapWithIndex: <A, B>(f: (i: number, a: A) => Option<B>) => (fa: readonly A[]) => readonly B[] | ||
export declare const filterMapWithIndex: <A, B>( | ||
f: (i: number, a: A) => Option<B> | ||
) => (fa: ReadonlyArray<A>) => ReadonlyArray<B> | ||
/** | ||
@@ -1187,3 +1192,3 @@ * @category filtering | ||
f: (i: number, a: A) => Either<B, C> | ||
) => (fa: readonly A[]) => Separated<readonly B[], readonly C[]> | ||
) => (fa: ReadonlyArray<A>) => Separated<ReadonlyArray<B>, ReadonlyArray<C>> | ||
/** | ||
@@ -1210,3 +1215,5 @@ * @category filtering | ||
*/ | ||
export declare const foldMapWithIndex: <M>(M: Monoid<M>) => <A>(f: (i: number, a: A) => M) => (fa: readonly A[]) => M | ||
export declare const foldMapWithIndex: <M>( | ||
M: Monoid<M> | ||
) => <A>(f: (i: number, a: A) => M) => (fa: ReadonlyArray<A>) => M | ||
/** | ||
@@ -1265,3 +1272,3 @@ * @category folding | ||
*/ | ||
export declare const unfold: <A, B>(b: B, f: (b: B) => Option<readonly [A, B]>) => readonly A[] | ||
export declare const unfold: <A, B>(b: B, f: (b: B) => Option<readonly [A, B]>) => ReadonlyArray<A> | ||
/** | ||
@@ -1286,3 +1293,3 @@ * @category type lambdas | ||
*/ | ||
export declare const getShow: <A>(S: Show<A>) => Show<readonly A[]> | ||
export declare const getShow: <A>(S: Show<A>) => Show<ReadonlyArray<A>> | ||
/** | ||
@@ -1292,3 +1299,3 @@ * @category instances | ||
*/ | ||
export declare const getSemigroup: <A = never>() => Semigroup<readonly A[]> | ||
export declare const getSemigroup: <A = never>() => Semigroup<ReadonlyArray<A>> | ||
/** | ||
@@ -1306,3 +1313,3 @@ * Returns a `Monoid` for `ReadonlyArray<A>`. | ||
*/ | ||
export declare const getMonoid: <A = never>() => Monoid<readonly A[]> | ||
export declare const getMonoid: <A = never>() => Monoid<ReadonlyArray<A>> | ||
/** | ||
@@ -1324,3 +1331,3 @@ * Derives an `Eq` over the `ReadonlyArray` of a given element type from the `Eq` of that type. The derived `Eq` defines two | ||
*/ | ||
export declare const getEq: <A>(E: Eq<A>) => Eq<readonly A[]> | ||
export declare const getEq: <A>(E: Eq<A>) => Eq<ReadonlyArray<A>> | ||
/** | ||
@@ -1345,3 +1352,3 @@ * Derives an `Ord` over the `ReadonlyArray` of a given element type from the `Ord` of that type. The ordering between two such | ||
*/ | ||
export declare const getOrd: <A>(O: Ord<A>) => Ord<readonly A[]> | ||
export declare const getOrd: <A>(O: Ord<A>) => Ord<ReadonlyArray<A>> | ||
/** | ||
@@ -1351,3 +1358,3 @@ * @category instances | ||
*/ | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Semigroup<readonly A[]> | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Semigroup<ReadonlyArray<A>> | ||
/** | ||
@@ -1357,3 +1364,3 @@ * @category instances | ||
*/ | ||
export declare const getUnionMonoid: <A>(E: Eq<A>) => Monoid<readonly A[]> | ||
export declare const getUnionMonoid: <A>(E: Eq<A>) => Monoid<ReadonlyArray<A>> | ||
/** | ||
@@ -1363,3 +1370,3 @@ * @category instances | ||
*/ | ||
export declare const getIntersectionSemigroup: <A>(E: Eq<A>) => Semigroup<readonly A[]> | ||
export declare const getIntersectionSemigroup: <A>(E: Eq<A>) => Semigroup<ReadonlyArray<A>> | ||
/** | ||
@@ -1369,3 +1376,3 @@ * @category instances | ||
*/ | ||
export declare const getDifferenceMagma: <A>(E: Eq<A>) => Magma<readonly A[]> | ||
export declare const getDifferenceMagma: <A>(E: Eq<A>) => Magma<ReadonlyArray<A>> | ||
/** | ||
@@ -1380,3 +1387,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: readonly ((a: A) => B)[]) => readonly B[] | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'ReadonlyArray', (a: A) => B>) => import('./HKT').Kind<'ReadonlyArray', B> | ||
/** | ||
@@ -1402,3 +1411,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: readonly B[]) => <A>(first: readonly A[]) => readonly A[] | ||
export declare const apFirst: <B>( | ||
second: readonly B[] | ||
) => <A>(first: import('./HKT').Kind<'ReadonlyArray', A>) => import('./HKT').Kind<'ReadonlyArray', A> | ||
/** | ||
@@ -1409,3 +1420,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: readonly B[]) => <A>(first: readonly A[]) => readonly B[] | ||
export declare const apSecond: <B>( | ||
second: readonly B[] | ||
) => <A>(first: import('./HKT').Kind<'ReadonlyArray', A>) => import('./HKT').Kind<'ReadonlyArray', B> | ||
/** | ||
@@ -1472,3 +1485,3 @@ * @category instances | ||
*/ | ||
export declare const guard: (b: boolean) => readonly void[] | ||
export declare const guard: (b: boolean) => import('./HKT').Kind<'ReadonlyArray', void> | ||
/** | ||
@@ -1523,3 +1536,3 @@ * @category instances | ||
*/ | ||
export declare const chainRecDepthFirst: <A, B>(f: (a: A) => readonly Either<A, B>[]) => (a: A) => readonly B[] | ||
export declare const chainRecDepthFirst: <A, B>(f: (a: A) => ReadonlyArray<Either<A, B>>) => (a: A) => ReadonlyArray<B> | ||
/** | ||
@@ -1534,3 +1547,5 @@ * @category instances | ||
*/ | ||
export declare const chainRecBreadthFirst: <A, B>(f: (a: A) => readonly Either<A, B>[]) => (a: A) => readonly B[] | ||
export declare const chainRecBreadthFirst: <A, B>( | ||
f: (a: A) => ReadonlyArray<Either<A, B>> | ||
) => (a: A) => ReadonlyArray<B> | ||
/** | ||
@@ -1590,3 +1605,3 @@ * @category instances | ||
*/ | ||
export declare const unsafeUpdateAt: <A>(i: number, a: A, as: readonly A[]) => readonly A[] | ||
export declare const unsafeUpdateAt: <A>(i: number, a: A, as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -1596,3 +1611,3 @@ * @category unsafe | ||
*/ | ||
export declare const unsafeDeleteAt: <A>(i: number, as: readonly A[]) => readonly A[] | ||
export declare const unsafeDeleteAt: <A>(i: number, as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -1602,3 +1617,3 @@ * @category conversions | ||
*/ | ||
export declare const toArray: <A>(as: readonly A[]) => A[] | ||
export declare const toArray: <A>(as: ReadonlyArray<A>) => Array<A> | ||
/** | ||
@@ -1608,3 +1623,3 @@ * @category conversions | ||
*/ | ||
export declare const fromArray: <A>(as: A[]) => readonly A[] | ||
export declare const fromArray: <A>(as: Array<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -1648,3 +1663,3 @@ * An empty array | ||
*/ | ||
export declare const some: <A>(predicate: Predicate<A>) => (as: readonly A[]) => as is RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const some: <A>(predicate: Predicate<A>) => (as: ReadonlyArray<A>) => as is ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -1669,3 +1684,3 @@ * Alias of [`some`](#some) | ||
*/ | ||
export declare const intercalate: <A>(M: Monoid<A>) => (middle: A) => (as: readonly A[]) => A | ||
export declare const intercalate: <A>(M: Monoid<A>) => (middle: A) => (as: ReadonlyArray<A>) => A | ||
/** | ||
@@ -1680,7 +1695,13 @@ * @category do notation | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: readonly A[]) => readonly { readonly [K in N]: A }[] | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>( | ||
fa: import('./HKT').Kind<'ReadonlyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyArray', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: readonly A[]) => readonly { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }[] | ||
) => ( | ||
fa: import('./HKT').Kind<'ReadonlyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -1699,4 +1720,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => readonly B[] | ||
) => (ma: readonly A[]) => readonly { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }[] | ||
f: (a: A) => import('./HKT').Kind<'ReadonlyArray', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'ReadonlyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1709,3 +1732,5 @@ * @category do notation | ||
fb: readonly B[] | ||
) => (fa: readonly A[]) => readonly { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }[] | ||
) => ( | ||
fa: import('./HKT').Kind<'ReadonlyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1725,3 +1750,3 @@ * Alias of `flatMap`. | ||
*/ | ||
export declare const range: (start: number, end: number) => RNEA.ReadonlyNonEmptyArray<number> | ||
export declare const range: (start: number, end: number) => ReadonlyNonEmptyArray<number> | ||
/** | ||
@@ -1742,3 +1767,3 @@ * Use [`prepend`](#prepend) instead. | ||
*/ | ||
export declare const snoc: <A>(init: readonly A[], end: A) => RNEA.ReadonlyNonEmptyArray<A> | ||
export declare const snoc: <A>(init: ReadonlyArray<A>, end: A) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -1751,3 +1776,3 @@ * Use [`prependAll`](#prependall) instead. | ||
*/ | ||
export declare const prependToAll: <A>(middle: A) => (as: readonly A[]) => readonly A[] | ||
export declare const prependToAll: <A>(middle: A) => (as: ReadonlyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -1754,0 +1779,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -75,3 +75,3 @@ import { Compactable2 } from './Compactable' | ||
*/ | ||
export declare const keys: <K>(O: Ord<K>) => <A>(m: ReadonlyMap<K, A>) => readonly K[] | ||
export declare const keys: <K>(O: Ord<K>) => <A>(m: ReadonlyMap<K, A>) => ReadonlyArray<K> | ||
/** | ||
@@ -82,3 +82,3 @@ * Get a sorted `ReadonlyArray` of the values contained in a `ReadonlyMap`. | ||
*/ | ||
export declare const values: <A>(O: Ord<A>) => <K>(m: ReadonlyMap<K, A>) => readonly A[] | ||
export declare const values: <A>(O: Ord<A>) => <K>(m: ReadonlyMap<K, A>) => ReadonlyArray<A> | ||
/** | ||
@@ -96,3 +96,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const toReadonlyArray: <K>(O: Ord<K>) => <A>(m: ReadonlyMap<K, A>) => readonly (readonly [K, A])[] | ||
export declare const toReadonlyArray: <K>(O: Ord<K>) => <A>(m: ReadonlyMap<K, A>) => ReadonlyArray<readonly [K, A]> | ||
/** | ||
@@ -127,3 +127,3 @@ * Unfolds a map into a list of key/value pairs | ||
*/ | ||
export declare const updateAt: <K>(E: Eq<K>) => <A>(k: K, a: A) => (m: ReadonlyMap<K, A>) => O.Option<ReadonlyMap<K, A>> | ||
export declare const updateAt: <K>(E: Eq<K>) => <A>(k: K, a: A) => (m: ReadonlyMap<K, A>) => Option<ReadonlyMap<K, A>> | ||
/** | ||
@@ -134,3 +134,3 @@ * @since 2.5.0 | ||
E: Eq<K> | ||
) => <A>(k: K, f: (a: A) => A) => (m: ReadonlyMap<K, A>) => O.Option<ReadonlyMap<K, A>> | ||
) => <A>(k: K, f: (a: A) => A) => (m: ReadonlyMap<K, A>) => Option<ReadonlyMap<K, A>> | ||
/** | ||
@@ -245,3 +245,3 @@ * Delete a key and value from a map, returning the value as well as the subsequent map | ||
export declare const filterMapWithIndex: <K, A, B>( | ||
f: (k: K, a: A) => O.Option<B> | ||
f: (k: K, a: A) => Option<B> | ||
) => (fa: ReadonlyMap<K, A>) => ReadonlyMap<K, B> | ||
@@ -264,3 +264,3 @@ /** | ||
*/ | ||
export declare const compact: <K, A>(fa: ReadonlyMap<K, O.Option<A>>) => ReadonlyMap<K, A> | ||
export declare const compact: <K, A>(fa: ReadonlyMap<K, Option<A>>) => ReadonlyMap<K, A> | ||
/** | ||
@@ -369,3 +369,3 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: ReadonlyMap<E, (a: A) => B>) => ReadonlyMap<E, B> | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Kind2<'ReadonlyMap', E, (a: A) => B>) => Kind2<'ReadonlyMap', E, B> | ||
/** | ||
@@ -375,3 +375,3 @@ * @category instances | ||
*/ | ||
export declare const getFunctorWithIndex: <K = never>() => FunctorWithIndex2C<'ReadonlyMap', K, K> | ||
export declare const getFunctorWithIndex: <K = never>() => FunctorWithIndex2C<URI, K, K> | ||
/** | ||
@@ -406,3 +406,3 @@ * @category instances | ||
*/ | ||
export declare const getFoldable: <K>(O: Ord<K>) => Foldable2C<'ReadonlyMap', K> | ||
export declare const getFoldable: <K>(O: Ord<K>) => Foldable2C<URI, K> | ||
/** | ||
@@ -433,3 +433,3 @@ * @category folding | ||
*/ | ||
export declare const getFoldableWithIndex: <K>(O: Ord<K>) => FoldableWithIndex2C<'ReadonlyMap', K, K> | ||
export declare const getFoldableWithIndex: <K>(O: Ord<K>) => FoldableWithIndex2C<URI, K, K> | ||
/** | ||
@@ -439,3 +439,3 @@ * @category traversing | ||
*/ | ||
export declare const getTraversable: <K>(O: Ord<K>) => Traversable2C<'ReadonlyMap', K> | ||
export declare const getTraversable: <K>(O: Ord<K>) => Traversable2C<URI, K> | ||
/** | ||
@@ -445,3 +445,3 @@ * @category traversing | ||
*/ | ||
export declare const getTraversableWithIndex: <K>(O: Ord<K>) => TraversableWithIndex2C<'ReadonlyMap', K, K> | ||
export declare const getTraversableWithIndex: <K>(O: Ord<K>) => TraversableWithIndex2C<URI, K, K> | ||
/** | ||
@@ -448,0 +448,0 @@ * @category filtering |
@@ -26,4 +26,20 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.foldMap = exports.reduce = exports.Filterable = exports.Compactable = exports.getFunctorWithIndex = exports.flap = exports.Functor = exports.getFilterableWithIndex = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.URI = exports.separate = exports.partitionMap = exports.partition = exports.mapWithIndex = exports.map = exports.filterMap = exports.filter = exports.compact = exports.filterWithIndex = exports.filterMapWithIndex = exports.partitionWithIndex = exports.partitionMapWithIndex = exports.fromFoldable = exports.singleton = exports.getMonoid = exports.getEq = exports.empty = exports.isSubmap = exports.lookup = exports.lookupWithKey = exports.pop = exports.modifyAt = exports.updateAt = exports.deleteAt = exports.upsertAt = exports.toUnfoldable = exports.toReadonlyArray = exports.collect = exports.values = exports.keys = exports.elem = exports.member = exports.isEmpty = exports.size = exports.getShow = exports.toMap = exports.fromMap = void 0; | ||
exports.readonlyMap = exports.insertAt = exports.difference = exports.intersection = exports.union = exports.getWitherable = exports.getTraversableWithIndex = exports.getTraversable = exports.getFoldableWithIndex = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.getFoldable = exports.reduceRight = void 0; | ||
exports.readonlyMap = exports.insertAt = exports.difference = exports.intersection = exports.union = exports.getTraversableWithIndex = exports.getTraversable = exports.getFoldableWithIndex = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.getFoldable = exports.reduceRight = exports.foldMap = exports.reduce = exports.Filterable = exports.Compactable = exports.getFunctorWithIndex = exports.flap = exports.Functor = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.URI = exports.separate = exports.partitionMap = exports.partition = exports.mapWithIndex = exports.map = exports.filterMap = exports.filter = exports.compact = exports.filterMapWithIndex = exports.partitionMapWithIndex = exports.singleton = exports.empty = exports.modifyAt = exports.updateAt = exports.deleteAt = exports.upsertAt = exports.toReadonlyArray = exports.values = exports.keys = exports.isEmpty = exports.size = exports.fromMap = void 0; | ||
exports.toMap = toMap; | ||
exports.getShow = getShow; | ||
exports.member = member; | ||
exports.elem = elem; | ||
exports.collect = collect; | ||
exports.toUnfoldable = toUnfoldable; | ||
exports.pop = pop; | ||
exports.lookupWithKey = lookupWithKey; | ||
exports.lookup = lookup; | ||
exports.isSubmap = isSubmap; | ||
exports.getEq = getEq; | ||
exports.getMonoid = getMonoid; | ||
exports.fromFoldable = fromFoldable; | ||
exports.partitionWithIndex = partitionWithIndex; | ||
exports.filterWithIndex = filterWithIndex; | ||
exports.getFilterableWithIndex = getFilterableWithIndex; | ||
exports.getWitherable = getWitherable; | ||
var Eq_1 = require("./Eq"); | ||
@@ -49,3 +65,2 @@ var function_1 = require("./function"); | ||
} | ||
exports.toMap = toMap; | ||
/** | ||
@@ -66,3 +81,2 @@ * @category instances | ||
} | ||
exports.getShow = getShow; | ||
/** | ||
@@ -92,3 +106,2 @@ * Calculate the number of key/value pairs in a map | ||
} | ||
exports.member = member; | ||
function elem(E) { | ||
@@ -111,3 +124,2 @@ return function (a, m) { | ||
} | ||
exports.elem = elem; | ||
/** | ||
@@ -152,3 +164,2 @@ * Get a sorted `ReadonlyArray` of the keys contained in a `ReadonlyMap`. | ||
} | ||
exports.collect = collect; | ||
/** | ||
@@ -172,3 +183,2 @@ * Get a sorted `ReadonlyArray` of the key/value pairs contained in a `ReadonlyMap`. | ||
} | ||
exports.toUnfoldable = toUnfoldable; | ||
/** | ||
@@ -262,3 +272,2 @@ * Insert or replace a key/value pair in a `ReadonlyMap`. | ||
} | ||
exports.pop = pop; | ||
function lookupWithKey(E) { | ||
@@ -281,3 +290,2 @@ return function (k, m) { | ||
} | ||
exports.lookupWithKey = lookupWithKey; | ||
function lookup(E) { | ||
@@ -296,3 +304,2 @@ var lookupWithKeyE = lookupWithKey(E); | ||
} | ||
exports.lookup = lookup; | ||
function isSubmap(SK, SA) { | ||
@@ -317,3 +324,2 @@ var lookupWithKeyS = lookupWithKey(SK); | ||
} | ||
exports.isSubmap = isSubmap; | ||
/** | ||
@@ -333,3 +339,2 @@ * @since 2.5.0 | ||
} | ||
exports.getEq = getEq; | ||
/** | ||
@@ -369,3 +374,2 @@ * Gets `Monoid` instance for Maps given `Semigroup` instance for their values | ||
} | ||
exports.getMonoid = getMonoid; | ||
/** | ||
@@ -395,3 +399,2 @@ * Create a map with one key/value pair | ||
} | ||
exports.fromFoldable = fromFoldable; | ||
var _mapWithIndex = function (fa, f) { | ||
@@ -448,3 +451,2 @@ var m = new Map(); | ||
} | ||
exports.partitionWithIndex = partitionWithIndex; | ||
/** | ||
@@ -483,3 +485,2 @@ * @since 2.10.0 | ||
} | ||
exports.filterWithIndex = filterWithIndex; | ||
var _map = function (fa, f) { return _mapWithIndex(fa, function (_, a) { return f(a); }); }; | ||
@@ -662,3 +663,2 @@ var _filter = function (fa, p) { | ||
} | ||
exports.getFilterableWithIndex = getFilterableWithIndex; | ||
/** | ||
@@ -932,3 +932,2 @@ * @category instances | ||
} | ||
exports.getWitherable = getWitherable; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -935,0 +934,0 @@ // utils |
@@ -97,3 +97,3 @@ /** | ||
export declare const sortBy: <B>( | ||
ords: readonly Ord<B>[] | ||
ords: ReadonlyArray<Ord<B>> | ||
) => <A extends B>(as: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<A> | ||
@@ -124,3 +124,3 @@ /** | ||
*/ | ||
export declare const fromReadonlyArray: <A>(as: readonly A[]) => Option<ReadonlyNonEmptyArray<A>> | ||
export declare const fromReadonlyArray: <A>(as: ReadonlyArray<A>) => Option<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -179,3 +179,3 @@ * Return a `ReadonlyNonEmptyArray` of length `n` with element `i` initialized with `f(i)`. | ||
*/ | ||
export declare const unprepend: <A>(as: ReadonlyNonEmptyArray<A>) => readonly [A, readonly A[]] | ||
export declare const unprepend: <A>(as: ReadonlyNonEmptyArray<A>) => readonly [A, ReadonlyArray<A>] | ||
/** | ||
@@ -191,3 +191,3 @@ * Return the tuple of the `init` and the `last`. | ||
*/ | ||
export declare const unappend: <A>(as: ReadonlyNonEmptyArray<A>) => readonly [readonly A[], A] | ||
export declare const unappend: <A>(as: ReadonlyNonEmptyArray<A>) => readonly [ReadonlyArray<A>, A] | ||
/** | ||
@@ -197,3 +197,3 @@ * @category conversions | ||
*/ | ||
export declare const fromArray: <A>(as: A[]) => Option<ReadonlyNonEmptyArray<A>> | ||
export declare const fromArray: <A>(as: Array<A>) => Option<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -260,3 +260,3 @@ * @since 2.11.0 | ||
f: (a: A) => string | ||
) => (as: readonly A[]) => Readonly<Record<string, ReadonlyNonEmptyArray<A>>> | ||
) => (as: ReadonlyArray<A>) => ReadonlyRecord<string, ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -341,3 +341,3 @@ * @since 2.5.0 | ||
export declare const chop: <A, B>( | ||
f: (as: ReadonlyNonEmptyArray<A>) => readonly [B, readonly A[]] | ||
f: (as: ReadonlyNonEmptyArray<A>) => readonly [B, ReadonlyArray<A>] | ||
) => (as: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<B> | ||
@@ -351,3 +351,3 @@ /** | ||
n: number | ||
) => <A>(as: ReadonlyNonEmptyArray<A>) => readonly [ReadonlyNonEmptyArray<A>, readonly A[]] | ||
) => <A>(as: ReadonlyNonEmptyArray<A>) => readonly [ReadonlyNonEmptyArray<A>, ReadonlyArray<A>] | ||
/** | ||
@@ -389,3 +389,3 @@ * Splits a `ReadonlyNonEmptyArray` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of | ||
that: LazyArg<ReadonlyNonEmptyArray<B>> | ||
) => <A>(as: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<B | A> | ||
) => <A>(as: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<A | B> | ||
/** | ||
@@ -482,3 +482,3 @@ * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to | ||
*/ | ||
export declare const foldMap: <S>(S: Se.Semigroup<S>) => <A>(f: (a: A) => S) => (as: ReadonlyNonEmptyArray<A>) => S | ||
export declare const foldMap: <S>(S: Semigroup<S>) => <A>(f: (a: A) => S) => (as: ReadonlyNonEmptyArray<A>) => S | ||
/** | ||
@@ -504,3 +504,3 @@ * @category folding | ||
export declare const foldMapWithIndex: <S>( | ||
S: Se.Semigroup<S> | ||
S: Semigroup<S> | ||
) => <A>(f: (i: number, a: A) => S) => (as: ReadonlyNonEmptyArray<A>) => S | ||
@@ -561,3 +561,3 @@ /** | ||
*/ | ||
export declare const getSemigroup: <A = never>() => Se.Semigroup<ReadonlyNonEmptyArray<A>> | ||
export declare const getSemigroup: <A = never>() => Semigroup<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -579,3 +579,3 @@ * @example | ||
*/ | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Se.Semigroup<ReadonlyNonEmptyArray<A>> | ||
export declare const getUnionSemigroup: <A>(E: Eq<A>) => Semigroup<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -590,3 +590,7 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: ReadonlyNonEmptyArray<(a: A) => B>) => ReadonlyNonEmptyArray<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>( | ||
fab: import('./HKT').Kind<'ReadonlyNonEmptyArray', (a: A) => B> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', B> | ||
/** | ||
@@ -614,3 +618,3 @@ * @category instances | ||
second: ReadonlyNonEmptyArray<B> | ||
) => <A>(first: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<A> | ||
) => <A>(first: import('./HKT').Kind<'ReadonlyNonEmptyArray', A>) => import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
/** | ||
@@ -623,3 +627,3 @@ * Combine two effectful actions, keeping only the result of the second. | ||
second: ReadonlyNonEmptyArray<B> | ||
) => <A>(first: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<B> | ||
) => <A>(first: import('./HKT').Kind<'ReadonlyNonEmptyArray', A>) => import('./HKT').Kind<'ReadonlyNonEmptyArray', B> | ||
/** | ||
@@ -703,3 +707,5 @@ * @category instances | ||
name: N | ||
) => <A>(fa: ReadonlyNonEmptyArray<A>) => ReadonlyNonEmptyArray<{ readonly [K in N]: A }> | ||
) => <A>( | ||
fa: import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
@@ -709,4 +715,4 @@ name: Exclude<N, keyof A>, | ||
) => ( | ||
fa: ReadonlyNonEmptyArray<A> | ||
) => ReadonlyNonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -725,6 +731,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => ReadonlyNonEmptyArray<B> | ||
f: (a: A) => import('./HKT').Kind<'ReadonlyNonEmptyArray', B> | ||
) => ( | ||
ma: ReadonlyNonEmptyArray<A> | ||
) => ReadonlyNonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
ma: import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -738,4 +744,4 @@ * @category do notation | ||
) => ( | ||
fa: ReadonlyNonEmptyArray<A> | ||
) => ReadonlyNonEmptyArray<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind<'ReadonlyNonEmptyArray', A> | ||
) => import('./HKT').Kind<'ReadonlyNonEmptyArray', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -764,3 +770,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const init: <A>(as: ReadonlyNonEmptyArray<A>) => readonly A[] | ||
export declare const init: <A>(as: ReadonlyNonEmptyArray<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -777,3 +783,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const concatAll: <A>(S: Se.Semigroup<A>) => (as: ReadonlyNonEmptyArray<A>) => A | ||
export declare const concatAll: <A>(S: Semigroup<A>) => (as: ReadonlyNonEmptyArray<A>) => A | ||
/** | ||
@@ -785,3 +791,3 @@ * Break a `ReadonlyArray` into its first element and remaining elements. | ||
*/ | ||
export declare const matchLeft: <A, B>(f: (head: A, tail: readonly A[]) => B) => (as: ReadonlyNonEmptyArray<A>) => B | ||
export declare const matchLeft: <A, B>(f: (head: A, tail: ReadonlyArray<A>) => B) => (as: ReadonlyNonEmptyArray<A>) => B | ||
/** | ||
@@ -793,3 +799,5 @@ * Break a `ReadonlyArray` into its initial elements and the last element. | ||
*/ | ||
export declare const matchRight: <A, B>(f: (init: readonly A[], last: A) => B) => (as: ReadonlyNonEmptyArray<A>) => B | ||
export declare const matchRight: <A, B>( | ||
f: (init: ReadonlyArray<A>, last: A) => B | ||
) => (as: ReadonlyNonEmptyArray<A>) => B | ||
/** | ||
@@ -830,3 +838,3 @@ * Apply a function to the head, creating a new `ReadonlyNonEmptyArray`. | ||
*/ | ||
export declare const intercalate: <A>(S: Se.Semigroup<A>) => (middle: A) => (as: ReadonlyNonEmptyArray<A>) => A | ||
export declare const intercalate: <A>(S: Semigroup<A>) => (middle: A) => (as: ReadonlyNonEmptyArray<A>) => A | ||
/** | ||
@@ -911,3 +919,3 @@ * Alias of `flatMap`. | ||
*/ | ||
export declare const snoc: <A>(init: readonly A[], end: A) => ReadonlyNonEmptyArray<A> | ||
export declare const snoc: <A>(init: ReadonlyArray<A>, end: A) => ReadonlyNonEmptyArray<A> | ||
/** | ||
@@ -920,3 +928,3 @@ * Use [`insertAt`](./ReadonlyArray.ts.html#insertat) instead. | ||
*/ | ||
export declare const insertAt: <A>(i: number, a: A) => (as: readonly A[]) => Option<ReadonlyNonEmptyArray<A>> | ||
export declare const insertAt: <A>(i: number, a: A) => (as: ReadonlyArray<A>) => Option<ReadonlyNonEmptyArray<A>> | ||
/** | ||
@@ -937,3 +945,3 @@ * Use [`prependAll`](#prependall) instead. | ||
*/ | ||
export declare const fold: <A>(S: Se.Semigroup<A>) => (as: ReadonlyNonEmptyArray<A>) => A | ||
export declare const fold: <A>(S: Semigroup<A>) => (as: ReadonlyNonEmptyArray<A>) => A | ||
/** | ||
@@ -940,0 +948,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -35,5 +35,12 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.reduceRight = exports.foldMap = exports.reduce = exports.mapWithIndex = exports.map = exports.flatten = exports.duplicate = exports.extend = exports.flatMap = exports.ap = exports.alt = exports.altW = exports.of = exports.chunksOf = exports.splitAt = exports.chop = exports.chainWithIndex = exports.intersperse = exports.prependAll = exports.unzip = exports.zip = exports.zipWith = exports.modifyAt = exports.updateAt = exports.sort = exports.groupBy = exports.group = exports.reverse = exports.concat = exports.concatW = exports.fromArray = exports.unappend = exports.unprepend = exports.range = exports.replicate = exports.makeBy = exports.fromReadonlyArray = exports.rotate = exports.union = exports.sortBy = exports.uniq = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.append = exports.appendW = exports.prepend = exports.prependW = exports.isOutOfBound = exports.isNonEmpty = exports.empty = void 0; | ||
exports.groupSort = exports.chain = exports.intercalate = exports.updateLast = exports.modifyLast = exports.updateHead = exports.modifyHead = exports.matchRight = exports.matchLeft = exports.concatAll = exports.max = exports.min = exports.init = exports.last = exports.tail = exports.head = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.Comonad = exports.Alt = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.Monad = exports.chainFirst = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.FunctorWithIndex = exports.Pointed = exports.flap = exports.Functor = exports.getUnionSemigroup = exports.getEq = exports.getSemigroup = exports.getShow = exports.URI = exports.extract = exports.traverseWithIndex = exports.sequence = exports.traverse = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = void 0; | ||
exports.readonlyNonEmptyArray = exports.fold = exports.prependToAll = exports.insertAt = exports.snoc = exports.cons = exports.unsnoc = exports.uncons = exports.filterWithIndex = exports.filter = void 0; | ||
exports.traverse = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.reduceRight = exports.foldMap = exports.reduce = exports.mapWithIndex = exports.map = exports.flatten = exports.duplicate = exports.extend = exports.flatMap = exports.ap = exports.alt = exports.altW = exports.of = exports.chunksOf = exports.splitAt = exports.chop = exports.chainWithIndex = exports.intersperse = exports.prependAll = exports.unzip = exports.zipWith = exports.modifyAt = exports.updateAt = exports.sort = exports.groupBy = exports.reverse = exports.fromArray = exports.unappend = exports.unprepend = exports.range = exports.replicate = exports.makeBy = exports.fromReadonlyArray = exports.rotate = exports.union = exports.sortBy = exports.uniq = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.append = exports.appendW = exports.prepend = exports.prependW = exports.isOutOfBound = exports.isNonEmpty = exports.empty = void 0; | ||
exports.insertAt = exports.snoc = exports.unsnoc = exports.uncons = exports.filterWithIndex = exports.chain = exports.intercalate = exports.updateLast = exports.modifyLast = exports.updateHead = exports.modifyHead = exports.matchRight = exports.matchLeft = exports.concatAll = exports.max = exports.min = exports.init = exports.last = exports.tail = exports.head = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.Comonad = exports.Alt = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.Monad = exports.chainFirst = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.FunctorWithIndex = exports.Pointed = exports.flap = exports.Functor = exports.getUnionSemigroup = exports.getEq = exports.getSemigroup = exports.getShow = exports.URI = exports.extract = exports.traverseWithIndex = exports.sequence = void 0; | ||
exports.readonlyNonEmptyArray = exports.fold = exports.prependToAll = void 0; | ||
exports.concatW = concatW; | ||
exports.concat = concat; | ||
exports.group = group; | ||
exports.zip = zip; | ||
exports.groupSort = groupSort; | ||
exports.filter = filter; | ||
exports.cons = cons; | ||
var Apply_1 = require("./Apply"); | ||
@@ -331,7 +338,5 @@ var Chain_1 = require("./Chain"); | ||
} | ||
exports.concatW = concatW; | ||
function concat(x, y) { | ||
return y ? x.concat(y) : function (y) { return y.concat(x); }; | ||
} | ||
exports.concat = concat; | ||
/** | ||
@@ -368,3 +373,2 @@ * @since 2.5.0 | ||
} | ||
exports.group = group; | ||
/** | ||
@@ -444,3 +448,2 @@ * Splits an array into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning | ||
} | ||
exports.zip = zip; | ||
/** | ||
@@ -1216,7 +1219,5 @@ * @since 2.5.1 | ||
} | ||
exports.groupSort = groupSort; | ||
function filter(predicate) { | ||
return (0, exports.filterWithIndex)(function (_, a) { return predicate(a); }); | ||
} | ||
exports.filter = filter; | ||
/** | ||
@@ -1254,3 +1255,2 @@ * Use [`filterWithIndex`](./ReadonlyArray.ts.html#filterwithindex) instead. | ||
} | ||
exports.cons = cons; | ||
/** | ||
@@ -1257,0 +1257,0 @@ * Use [`append`](./ReadonlyArray.ts.html#append) instead. |
@@ -61,3 +61,3 @@ /** | ||
*/ | ||
export declare const fromRecord: <K extends string, A>(r: Record<K, A>) => Readonly<Record<K, A>> | ||
export declare const fromRecord: <K extends string, A>(r: Record<K, A>) => ReadonlyRecord<K, A> | ||
/** | ||
@@ -77,3 +77,3 @@ * Builds a mutable `Record` from a `ReadonlyRecord`. | ||
*/ | ||
export declare const toRecord: <K extends string, A>(r: Readonly<Record<K, A>>) => Record<K, A> | ||
export declare const toRecord: <K extends string, A>(r: ReadonlyRecord<K, A>) => Record<K, A> | ||
/** | ||
@@ -89,3 +89,3 @@ * Calculate the number of key/value pairs in a `ReadonlyRecord`, | ||
*/ | ||
export declare const size: <A>(r: Readonly<Record<string, A>>) => number | ||
export declare const size: <A>(r: ReadonlyRecord<string, A>) => number | ||
/** | ||
@@ -101,3 +101,3 @@ * Test whether a `ReadonlyRecord` is empty. | ||
*/ | ||
export declare const isEmpty: <A>(r: Readonly<Record<string, A>>) => boolean | ||
export declare const isEmpty: <A>(r: ReadonlyRecord<string, A>) => boolean | ||
/** | ||
@@ -183,3 +183,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const upsertAt: <A>(k: string, a: A) => (r: Readonly<Record<string, A>>) => Readonly<Record<string, A>> | ||
export declare const upsertAt: <A>(k: string, a: A) => (r: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -198,3 +198,3 @@ * Test whether or not a key exists in a `ReadonlyRecord`. | ||
*/ | ||
export declare const has: <K extends string>(k: string, r: Readonly<Record<K, unknown>>) => k is K | ||
export declare const has: <K extends string>(k: string, r: ReadonlyRecord<K, unknown>) => k is K | ||
/** | ||
@@ -232,3 +232,3 @@ * Delete a key and value from a `ReadonlyRecord`. | ||
a: A | ||
) => <K extends string>(r: Readonly<Record<K, A>>) => Option<Readonly<Record<K, A>>> | ||
) => <K extends string>(r: ReadonlyRecord<K, A>) => Option<ReadonlyRecord<K, A>> | ||
/** | ||
@@ -252,3 +252,3 @@ * Applies a mapping function to one specific key/value pair in a `ReadonlyRecord`. | ||
f: (a: A) => A | ||
) => <K extends string>(r: Readonly<Record<K, A>>) => Option<Readonly<Record<K, A>>> | ||
) => <K extends string>(r: ReadonlyRecord<K, A>) => Option<ReadonlyRecord<K, A>> | ||
/** | ||
@@ -451,3 +451,3 @@ * Delete a key and value from a `ReadonlyRecord`, returning the value as well as the subsequent `ReadonlyRecord`. | ||
*/ | ||
export declare const singleton: <A>(k: string, a: A) => Readonly<Record<string, A>> | ||
export declare const singleton: <A>(k: string, a: A) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -762,3 +762,3 @@ * @since 2.5.0 | ||
*/ | ||
export declare const toEntries: <K extends string, A>(r: Readonly<Record<K, A>>) => readonly (readonly [K, A])[] | ||
export declare const toEntries: <K extends string, A>(r: ReadonlyRecord<K, A>) => ReadonlyArray<readonly [K, A]> | ||
/** | ||
@@ -775,3 +775,3 @@ * Converts a `ReadonlyArray` of `[key, value]` tuples into a `ReadonlyRecord`. | ||
*/ | ||
export declare const fromEntries: <A>(fa: readonly (readonly [string, A])[]) => Readonly<Record<string, A>> | ||
export declare const fromEntries: <A>(fa: ReadonlyArray<readonly [string, A]>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -841,3 +841,3 @@ * Test if every value in a `ReadonlyRecord` satisfies the predicate. | ||
M: Magma<A> | ||
) => (second: Readonly<Record<string, A>>) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>> | ||
) => (second: ReadonlyRecord<string, A>) => (first: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -863,3 +863,3 @@ * Intersection of two `ReadonlyRecord`s. | ||
M: Magma<A> | ||
) => (second: Readonly<Record<string, A>>) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>> | ||
) => (second: ReadonlyRecord<string, A>) => (first: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -881,4 +881,4 @@ * Difference between two `ReadonlyRecord`s. | ||
export declare const difference: <A>( | ||
second: Readonly<Record<string, A>> | ||
) => (first: Readonly<Record<string, A>>) => Readonly<Record<string, A>> | ||
second: ReadonlyRecord<string, A> | ||
) => (first: ReadonlyRecord<string, A>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -1078,3 +1078,3 @@ * Given a `Predicate`, it produces a new `ReadonlyRecord` keeping only the entries with a | ||
*/ | ||
export declare const compact: <A>(r: Readonly<Record<string, Option<A>>>) => Readonly<Record<string, A>> | ||
export declare const compact: <A>(r: ReadonlyRecord<string, Option<A>>) => ReadonlyRecord<string, A> | ||
/** | ||
@@ -1104,4 +1104,4 @@ * Separate a `ReadonlyRecord` of `Either`s into `Left`s and `Right`s. | ||
export declare const separate: <A, B>( | ||
r: Readonly<Record<string, Either<A, B>>> | ||
) => Separated<Readonly<Record<string, A>>, Readonly<Record<string, B>>> | ||
r: ReadonlyRecord<string, Either<A, B>> | ||
) => Separated<ReadonlyRecord<string, A>, ReadonlyRecord<string, B>> | ||
/** | ||
@@ -1202,3 +1202,3 @@ * @category type lambdas | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Readonly<Record<string, (a: A) => B>>) => Readonly<Record<string, B>> | ||
export declare const flap: <A>(a: A) => <B>(fab: Kind<'ReadonlyRecord', (a: A) => B>) => Kind<'ReadonlyRecord', B> | ||
/** | ||
@@ -1278,3 +1278,3 @@ * @category instances | ||
*/ | ||
export declare const getUnionSemigroup: <A>(S: Se.Semigroup<A>) => Se.Semigroup<Readonly<Record<string, A>>> | ||
export declare const getUnionSemigroup: <A>(S: Semigroup<A>) => Semigroup<ReadonlyRecord<string, A>> | ||
/** | ||
@@ -1297,3 +1297,3 @@ * Same as `getMonoid`. | ||
*/ | ||
export declare const getUnionMonoid: <A>(S: Se.Semigroup<A>) => Monoid<Readonly<Record<string, A>>> | ||
export declare const getUnionMonoid: <A>(S: Semigroup<A>) => Monoid<ReadonlyRecord<string, A>> | ||
/** | ||
@@ -1316,3 +1316,3 @@ * Given a `Semigroup` in the base type, it produces a `Semigroup` | ||
*/ | ||
export declare const getIntersectionSemigroup: <A>(S: Se.Semigroup<A>) => Se.Semigroup<Readonly<Record<string, A>>> | ||
export declare const getIntersectionSemigroup: <A>(S: Semigroup<A>) => Semigroup<ReadonlyRecord<string, A>> | ||
/** | ||
@@ -1335,3 +1335,3 @@ * Produces a `Magma` with a `concat` function that combines | ||
*/ | ||
export declare const getDifferenceMagma: <A>() => Magma<Readonly<Record<string, A>>> | ||
export declare const getDifferenceMagma: <A>() => Magma<ReadonlyRecord<string, A>> | ||
/** | ||
@@ -1338,0 +1338,0 @@ * Use `getFoldable` instead. |
@@ -26,4 +26,34 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._partition = exports._filterMap = exports._filter = exports._reduceRight = exports._foldMap = exports._reduce = exports._mapWithIndex = exports._map = exports.difference = exports.intersection = exports.union = exports.elem = exports.some = exports.every = exports.fromEntries = exports.toEntries = exports.fromFoldableMap = exports.fromFoldable = exports.filterWithIndex = exports.filterMapWithIndex = exports.partitionWithIndex = exports.partitionMapWithIndex = exports.wilt = exports.wither = exports.sequence = exports.traverse = exports.traverseWithIndex = exports.singleton = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.map = exports.mapWithIndex = exports.empty = exports.lookup = exports.isSubrecord = exports.pop = exports.modifyAt = exports.updateAt = exports.deleteAt = exports.has = exports.upsertAt = exports.toUnfoldable = exports.toReadonlyArray = exports.collect = exports.keys = exports.isEmpty = exports.size = exports.toRecord = exports.fromRecord = void 0; | ||
exports.readonlyRecord = exports.hasOwnProperty = exports.insertAt = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.getWitherable = exports.getTraversableWithIndex = exports.getTraversable = exports.FilterableWithIndex = exports.Filterable = exports.Compactable = exports.getFoldableWithIndex = exports.getFoldable = exports.FunctorWithIndex = exports.flap = exports.Functor = exports.getMonoid = exports.getEq = exports.getShow = exports.URI = exports.separate = exports.compact = exports.reduceRight = exports.foldMap = exports.reduce = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports._sequence = exports._traverse = exports._filterWithIndex = exports._filterMapWithIndex = exports._partitionWithIndex = exports._partitionMapWithIndex = exports._reduceRightWithIndex = exports._foldMapWithIndex = exports._reduceWithIndex = exports._partitionMap = void 0; | ||
exports.Compactable = exports.getFoldableWithIndex = exports.getFoldable = exports.FunctorWithIndex = exports.flap = exports.Functor = exports.URI = exports.separate = exports.compact = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports._sequence = exports._traverse = exports._filterWithIndex = exports._filterMapWithIndex = exports._partitionWithIndex = exports._partitionMapWithIndex = exports._reduceRightWithIndex = exports._foldMapWithIndex = exports._reduceWithIndex = exports._partitionMap = exports._partition = exports._filterMap = exports._filter = exports._reduceRight = exports._foldMap = exports._reduce = exports._mapWithIndex = exports._map = exports.difference = exports.intersection = exports.union = exports.fromEntries = exports.toEntries = exports.wilt = exports.wither = exports.singleton = exports.empty = exports.modifyAt = exports.updateAt = exports.has = exports.upsertAt = exports.toReadonlyArray = exports.keys = exports.isEmpty = exports.size = exports.toRecord = exports.fromRecord = void 0; | ||
exports.readonlyRecord = exports.insertAt = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.getWitherable = exports.getTraversableWithIndex = exports.getTraversable = exports.FilterableWithIndex = exports.Filterable = void 0; | ||
exports.collect = collect; | ||
exports.toUnfoldable = toUnfoldable; | ||
exports.deleteAt = deleteAt; | ||
exports.pop = pop; | ||
exports.isSubrecord = isSubrecord; | ||
exports.lookup = lookup; | ||
exports.mapWithIndex = mapWithIndex; | ||
exports.map = map; | ||
exports.reduceWithIndex = reduceWithIndex; | ||
exports.foldMapWithIndex = foldMapWithIndex; | ||
exports.reduceRightWithIndex = reduceRightWithIndex; | ||
exports.traverseWithIndex = traverseWithIndex; | ||
exports.traverse = traverse; | ||
exports.sequence = sequence; | ||
exports.partitionMapWithIndex = partitionMapWithIndex; | ||
exports.partitionWithIndex = partitionWithIndex; | ||
exports.filterMapWithIndex = filterMapWithIndex; | ||
exports.filterWithIndex = filterWithIndex; | ||
exports.fromFoldable = fromFoldable; | ||
exports.fromFoldableMap = fromFoldableMap; | ||
exports.every = every; | ||
exports.some = some; | ||
exports.elem = elem; | ||
exports.reduce = reduce; | ||
exports.foldMap = foldMap; | ||
exports.reduceRight = reduceRight; | ||
exports.getShow = getShow; | ||
exports.getEq = getEq; | ||
exports.getMonoid = getMonoid; | ||
exports.hasOwnProperty = hasOwnProperty; | ||
var Eq_1 = require("./Eq"); | ||
@@ -124,3 +154,2 @@ var function_1 = require("./function"); | ||
} | ||
exports.collect = collect; | ||
/** | ||
@@ -151,3 +180,2 @@ * Get a sorted `ReadonlyArray` of the key/value pairs contained in a `ReadonlyRecord`. | ||
} | ||
exports.toUnfoldable = toUnfoldable; | ||
/** | ||
@@ -200,3 +228,2 @@ * Insert or replace a key/value pair in a `ReadonlyRecord`. | ||
} | ||
exports.deleteAt = deleteAt; | ||
/** | ||
@@ -268,3 +295,2 @@ * Replace a key/value pair in a `ReadonlyRecord`. | ||
} | ||
exports.pop = pop; | ||
function isSubrecord(E) { | ||
@@ -284,3 +310,2 @@ return function (me, that) { | ||
} | ||
exports.isSubrecord = isSubrecord; | ||
function lookup(k, r) { | ||
@@ -292,3 +317,2 @@ if (r === undefined) { | ||
} | ||
exports.lookup = lookup; | ||
/** | ||
@@ -309,7 +333,5 @@ * @since 2.5.0 | ||
} | ||
exports.mapWithIndex = mapWithIndex; | ||
function map(f) { | ||
return mapWithIndex(function (_, a) { return f(a); }); | ||
} | ||
exports.map = map; | ||
function reduceWithIndex() { | ||
@@ -335,3 +357,2 @@ var args = []; | ||
} | ||
exports.reduceWithIndex = reduceWithIndex; | ||
function foldMapWithIndex(O) { | ||
@@ -357,3 +378,2 @@ if ('compare' in O) { | ||
} | ||
exports.foldMapWithIndex = foldMapWithIndex; | ||
function reduceRightWithIndex() { | ||
@@ -379,3 +399,2 @@ var args = []; | ||
} | ||
exports.reduceRightWithIndex = reduceRightWithIndex; | ||
/** | ||
@@ -401,3 +420,2 @@ * Create a `ReadonlyRecord` with one key/value pair. | ||
} | ||
exports.traverseWithIndex = traverseWithIndex; | ||
function traverse(F) { | ||
@@ -407,7 +425,5 @@ var traverseOF = (0, exports._traverse)(S.Ord)(F); | ||
} | ||
exports.traverse = traverse; | ||
function sequence(F) { | ||
return (0, exports._sequence)(S.Ord)(F); | ||
} | ||
exports.sequence = sequence; | ||
/** | ||
@@ -451,3 +467,2 @@ * @category filtering | ||
} | ||
exports.partitionMapWithIndex = partitionMapWithIndex; | ||
function partitionWithIndex(predicateWithIndex) { | ||
@@ -471,3 +486,2 @@ return function (r) { | ||
} | ||
exports.partitionWithIndex = partitionWithIndex; | ||
function filterMapWithIndex(f) { | ||
@@ -487,3 +501,2 @@ return function (r) { | ||
} | ||
exports.filterMapWithIndex = filterMapWithIndex; | ||
function filterWithIndex(predicateWithIndex) { | ||
@@ -507,3 +520,2 @@ return function (fa) { | ||
} | ||
exports.filterWithIndex = filterWithIndex; | ||
function fromFoldable(M, F) { | ||
@@ -513,3 +525,2 @@ var fromFoldableMapM = fromFoldableMap(M, F); | ||
} | ||
exports.fromFoldable = fromFoldable; | ||
function fromFoldableMap(M, F) { | ||
@@ -524,3 +535,2 @@ return function (ta, f) { | ||
} | ||
exports.fromFoldableMap = fromFoldableMap; | ||
/** | ||
@@ -568,3 +578,2 @@ * Alias of [`toReadonlyArray`](#toreadonlyarray). | ||
} | ||
exports.every = every; | ||
/** | ||
@@ -591,3 +600,2 @@ * Test if at least one value in a `ReadonlyRecord` satisfies the predicate. | ||
} | ||
exports.some = some; | ||
function elem(E) { | ||
@@ -607,3 +615,2 @@ return function (a, fa) { | ||
} | ||
exports.elem = elem; | ||
/** | ||
@@ -953,3 +960,2 @@ * Union of two `ReadonlyRecord`s. | ||
} | ||
exports.reduce = reduce; | ||
function foldMap(O) { | ||
@@ -965,3 +971,2 @@ if ('compare' in O) { | ||
} | ||
exports.foldMap = foldMap; | ||
function reduceRight() { | ||
@@ -978,3 +983,2 @@ var args = []; | ||
} | ||
exports.reduceRight = reduceRight; | ||
/** | ||
@@ -1065,3 +1069,2 @@ * Compact a `ReadonlyRecord` of `Option`s discarding the `None` values and | ||
} | ||
exports.getShow = getShow; | ||
function getEq(E) { | ||
@@ -1071,3 +1074,2 @@ var isSubrecordE = isSubrecord(E); | ||
} | ||
exports.getEq = getEq; | ||
function getMonoid(S) { | ||
@@ -1093,3 +1095,2 @@ return { | ||
} | ||
exports.getMonoid = getMonoid; | ||
/** | ||
@@ -1463,3 +1464,2 @@ * @category instances | ||
} | ||
exports.hasOwnProperty = hasOwnProperty; | ||
/** | ||
@@ -1466,0 +1466,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -33,3 +33,3 @@ /** | ||
*/ | ||
export declare const fromReadonlyArray: <A>(E: Eq<A>) => (as: readonly A[]) => ReadonlySet<A> | ||
export declare const fromReadonlyArray: <A>(E: Eq<A>) => (as: ReadonlyArray<A>) => ReadonlySet<A> | ||
/** | ||
@@ -206,3 +206,3 @@ * @category conversions | ||
*/ | ||
export declare const toReadonlyArray: <A>(O: Ord<A>) => (set: ReadonlySet<A>) => readonly A[] | ||
export declare const toReadonlyArray: <A>(O: Ord<A>) => (set: ReadonlySet<A>) => ReadonlyArray<A> | ||
/** | ||
@@ -209,0 +209,0 @@ * @category type lambdas |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fromArray = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.getEq = exports.getShow = exports.URI = exports.toReadonlyArray = exports.elem = exports.isSubset = exports.every = exports.some = exports.size = exports.isEmpty = exports.empty = exports.filterMap = exports.separate = exports.compact = exports.toggle = exports.remove = exports.insert = exports.reduceRight = exports.foldMap = exports.reduce = exports.difference = exports.partitionMap = exports.intersection = exports.union = exports.partition = exports.filter = exports.chain = exports.map = exports.toSet = exports.fromReadonlyArray = exports.singleton = exports.fromSet = void 0; | ||
exports.fromArray = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.URI = exports.toReadonlyArray = exports.some = exports.size = exports.isEmpty = exports.empty = exports.compact = exports.toggle = exports.remove = exports.reduceRight = exports.fromReadonlyArray = exports.singleton = exports.fromSet = void 0; | ||
exports.toSet = toSet; | ||
exports.map = map; | ||
exports.chain = chain; | ||
exports.filter = filter; | ||
exports.partition = partition; | ||
exports.union = union; | ||
exports.intersection = intersection; | ||
exports.partitionMap = partitionMap; | ||
exports.difference = difference; | ||
exports.reduce = reduce; | ||
exports.foldMap = foldMap; | ||
exports.insert = insert; | ||
exports.separate = separate; | ||
exports.filterMap = filterMap; | ||
exports.every = every; | ||
exports.isSubset = isSubset; | ||
exports.elem = elem; | ||
exports.getShow = getShow; | ||
exports.getEq = getEq; | ||
var Eq_1 = require("./Eq"); | ||
@@ -53,3 +72,2 @@ var function_1 = require("./function"); | ||
} | ||
exports.toSet = toSet; | ||
/** | ||
@@ -73,3 +91,2 @@ * Projects a Set through a function | ||
} | ||
exports.map = map; | ||
/** | ||
@@ -92,3 +109,2 @@ * @since 2.5.0 | ||
} | ||
exports.chain = chain; | ||
function filter(predicate) { | ||
@@ -108,3 +124,2 @@ return function (set) { | ||
} | ||
exports.filter = filter; | ||
function partition(predicate) { | ||
@@ -128,3 +143,2 @@ return function (set) { | ||
} | ||
exports.partition = partition; | ||
function union(E) { | ||
@@ -152,3 +166,2 @@ var elemE = elem(E); | ||
} | ||
exports.union = union; | ||
function intersection(E) { | ||
@@ -173,3 +186,2 @@ var elemE = elem(E); | ||
} | ||
exports.intersection = intersection; | ||
/** | ||
@@ -206,3 +218,2 @@ * @since 2.5.0 | ||
} | ||
exports.partitionMap = partitionMap; | ||
function difference(E) { | ||
@@ -218,3 +229,2 @@ var elemE = elem(E); | ||
} | ||
exports.difference = difference; | ||
/** | ||
@@ -227,3 +237,2 @@ * @since 2.5.0 | ||
} | ||
exports.reduce = reduce; | ||
/** | ||
@@ -236,3 +245,2 @@ * @since 2.5.0 | ||
} | ||
exports.foldMap = foldMap; | ||
/** | ||
@@ -265,3 +273,2 @@ * @category folding | ||
} | ||
exports.insert = insert; | ||
/** | ||
@@ -325,3 +332,2 @@ * Delete a value from a set | ||
} | ||
exports.separate = separate; | ||
/** | ||
@@ -343,3 +349,2 @@ * @since 2.5.0 | ||
} | ||
exports.filterMap = filterMap; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -384,3 +389,2 @@ // utils | ||
} | ||
exports.every = every; | ||
function isSubset(E) { | ||
@@ -396,3 +400,2 @@ var elemE = elem(E); | ||
} | ||
exports.isSubset = isSubset; | ||
function elem(E) { | ||
@@ -413,3 +416,2 @@ return function (a, set) { | ||
} | ||
exports.elem = elem; | ||
/** | ||
@@ -449,3 +451,2 @@ * Get a sorted `ReadonlyArray` of the values contained in a `ReadonlySet`. | ||
} | ||
exports.getShow = getShow; | ||
/** | ||
@@ -459,3 +460,2 @@ * @category instances | ||
} | ||
exports.getEq = getEq; | ||
/** | ||
@@ -462,0 +462,0 @@ * @category instances |
@@ -148,3 +148,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: readonly [(a: A) => B, E]) => readonly [B, E] | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'ReadonlyTuple', E, (a: A) => B>) => import('./HKT').Kind2<'ReadonlyTuple', E, B> | ||
/** | ||
@@ -151,0 +153,0 @@ * Alias of [`mapFst`](#mapfst). |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readonlyTuple = exports.Traversable = exports.Foldable = exports.Comonad = exports.Semigroupoid = exports.Bifunctor = exports.mapLeft = exports.map = exports.flap = exports.Functor = exports.URI = exports.sequence = exports.traverse = exports.reduceRight = exports.foldMap = exports.reduce = exports.duplicate = exports.extract = exports.extend = exports.compose = exports.mapSnd = exports.mapFst = exports.bimap = exports.getChainRec = exports.getMonad = exports.getChain = exports.getApplicative = exports.getApply = exports.swap = exports.snd = exports.fst = void 0; | ||
exports.readonlyTuple = exports.Traversable = exports.Foldable = exports.Comonad = exports.Semigroupoid = exports.Bifunctor = exports.mapLeft = exports.map = exports.flap = exports.Functor = exports.URI = exports.sequence = exports.traverse = exports.reduceRight = exports.foldMap = exports.reduce = exports.duplicate = exports.extract = exports.extend = exports.compose = exports.mapSnd = exports.mapFst = exports.bimap = exports.swap = void 0; | ||
exports.fst = fst; | ||
exports.snd = snd; | ||
exports.getApply = getApply; | ||
exports.getApplicative = getApplicative; | ||
exports.getChain = getChain; | ||
exports.getMonad = getMonad; | ||
exports.getChainRec = getChainRec; | ||
var function_1 = require("./function"); | ||
@@ -15,3 +22,2 @@ var Functor_1 = require("./Functor"); | ||
} | ||
exports.fst = fst; | ||
/** | ||
@@ -23,3 +29,2 @@ * @since 2.5.0 | ||
} | ||
exports.snd = snd; | ||
/** | ||
@@ -42,3 +47,2 @@ * @since 2.5.0 | ||
} | ||
exports.getApply = getApply; | ||
var of = function (M) { | ||
@@ -63,3 +67,2 @@ return function (a) { | ||
} | ||
exports.getApplicative = getApplicative; | ||
/** | ||
@@ -82,3 +85,2 @@ * @category instances | ||
} | ||
exports.getChain = getChain; | ||
/** | ||
@@ -99,3 +101,2 @@ * @category instances | ||
} | ||
exports.getMonad = getMonad; | ||
/** | ||
@@ -127,3 +128,2 @@ * @category instances | ||
} | ||
exports.getChainRec = getChainRec; | ||
/* istanbul ignore next */ | ||
@@ -130,0 +130,0 @@ var _compose = function (bc, ab) { return (0, function_1.pipe)(bc, (0, exports.compose)(ab)); }; |
@@ -655,3 +655,3 @@ /** | ||
*/ | ||
export declare const toEntries: <K extends string, A>(r: Record<K, A>) => [K, A][] | ||
export declare const toEntries: <K extends string, A>(r: Record<K, A>) => Array<[K, A]> | ||
/** | ||
@@ -668,3 +668,3 @@ * Converts an `Array` of `[key, value]` tuples into a `Record`. | ||
*/ | ||
export declare const fromEntries: <A>(fa: [string, A][]) => Record<string, A> | ||
export declare const fromEntries: <A>(fa: Array<[string, A]>) => Record<string, A> | ||
/** | ||
@@ -1129,3 +1129,3 @@ * Create a `Record` from a foldable collection using the specified functions to | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Record<string, (a: A) => B>) => Record<string, B> | ||
export declare const flap: <A>(a: A) => <B>(fab: Kind<'Record', (a: A) => B>) => Kind<'Record', B> | ||
/** | ||
@@ -1205,3 +1205,3 @@ * @category instances | ||
*/ | ||
export declare const getUnionSemigroup: <A>(S: Se.Semigroup<A>) => Se.Semigroup<Record<string, A>> | ||
export declare const getUnionSemigroup: <A>(S: Semigroup<A>) => Semigroup<Record<string, A>> | ||
/** | ||
@@ -1224,3 +1224,3 @@ * Same as `getMonoid`. | ||
*/ | ||
export declare const getUnionMonoid: <A>(S: Se.Semigroup<A>) => Monoid<Record<string, A>> | ||
export declare const getUnionMonoid: <A>(S: Semigroup<A>) => Monoid<Record<string, A>> | ||
/** | ||
@@ -1243,3 +1243,3 @@ * Given a `Semigroup` in the base type, it produces a `Semigroup` | ||
*/ | ||
export declare const getIntersectionSemigroup: <A>(S: Se.Semigroup<A>) => Se.Semigroup<Record<string, A>> | ||
export declare const getIntersectionSemigroup: <A>(S: Semigroup<A>) => Semigroup<Record<string, A>> | ||
/** | ||
@@ -1246,0 +1246,0 @@ * Produces a `Magma` with a `concat` function that combines |
@@ -37,4 +37,22 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getShow = exports.URI = exports.separate = exports.compact = exports.reduceRight = exports.foldMap = exports.reduce = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports.difference = exports.intersection = exports.union = exports.elem = exports.some = exports.every = exports.fromFoldableMap = exports.fromEntries = exports.toEntries = exports.fromFoldable = exports.filterWithIndex = exports.filterMapWithIndex = exports.partitionWithIndex = exports.partitionMapWithIndex = exports.wilt = exports.wither = exports.sequence = exports.traverse = exports.traverseWithIndex = exports.singleton = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.map = exports.mapWithIndex = exports.lookup = exports.isSubrecord = exports.pop = exports.modifyAt = exports.updateAt = exports.deleteAt = exports.has = exports.upsertAt = exports.toUnfoldable = exports.toArray = exports.collect = exports.keys = exports.isEmpty = exports.size = void 0; | ||
exports.record = exports.hasOwnProperty = exports.insertAt = exports.empty = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.getWitherable = exports.getTraversableWithIndex = exports.getTraversable = exports.FilterableWithIndex = exports.Filterable = exports.Compactable = exports.getFoldableWithIndex = exports.getFoldable = exports.FunctorWithIndex = exports.flap = exports.Functor = exports.getMonoid = exports.getEq = void 0; | ||
exports.Foldable = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.getWitherable = exports.getTraversableWithIndex = exports.getTraversable = exports.FilterableWithIndex = exports.Filterable = exports.Compactable = exports.getFoldableWithIndex = exports.getFoldable = exports.FunctorWithIndex = exports.flap = exports.Functor = exports.getMonoid = exports.getEq = exports.URI = exports.separate = exports.compact = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports.difference = exports.intersection = exports.union = exports.elem = exports.some = exports.every = exports.fromEntries = exports.toEntries = exports.filterMapWithIndex = exports.partitionMapWithIndex = exports.wilt = exports.wither = exports.singleton = exports.map = exports.mapWithIndex = exports.lookup = exports.isSubrecord = exports.modifyAt = exports.updateAt = exports.has = exports.upsertAt = exports.toArray = exports.keys = exports.isEmpty = exports.size = void 0; | ||
exports.record = exports.hasOwnProperty = exports.insertAt = exports.empty = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = void 0; | ||
exports.collect = collect; | ||
exports.toUnfoldable = toUnfoldable; | ||
exports.deleteAt = deleteAt; | ||
exports.pop = pop; | ||
exports.reduceWithIndex = reduceWithIndex; | ||
exports.foldMapWithIndex = foldMapWithIndex; | ||
exports.reduceRightWithIndex = reduceRightWithIndex; | ||
exports.traverseWithIndex = traverseWithIndex; | ||
exports.traverse = traverse; | ||
exports.sequence = sequence; | ||
exports.partitionWithIndex = partitionWithIndex; | ||
exports.filterWithIndex = filterWithIndex; | ||
exports.fromFoldable = fromFoldable; | ||
exports.fromFoldableMap = fromFoldableMap; | ||
exports.reduce = reduce; | ||
exports.foldMap = foldMap; | ||
exports.reduceRight = reduceRight; | ||
exports.getShow = getShow; | ||
var A = __importStar(require("./Array")); | ||
@@ -106,3 +124,2 @@ var function_1 = require("./function"); | ||
} | ||
exports.collect = collect; | ||
/** | ||
@@ -136,3 +153,2 @@ * Get a sorted `Array` of the key/value pairs contained in a `Record`. | ||
} | ||
exports.toUnfoldable = toUnfoldable; | ||
/** | ||
@@ -174,3 +190,2 @@ * Insert or replace a key/value pair in a `Record`. | ||
} | ||
exports.deleteAt = deleteAt; | ||
/** | ||
@@ -228,3 +243,2 @@ * Replace a key/value pair in a `Record`. | ||
} | ||
exports.pop = pop; | ||
// TODO: remove non-curried overloading in v3 | ||
@@ -308,7 +322,5 @@ /** | ||
} | ||
exports.reduceWithIndex = reduceWithIndex; | ||
function foldMapWithIndex(O) { | ||
return 'compare' in O ? RR.foldMapWithIndex(O) : RR.foldMapWithIndex(S.Ord)(O); | ||
} | ||
exports.foldMapWithIndex = foldMapWithIndex; | ||
function reduceRightWithIndex() { | ||
@@ -321,3 +333,2 @@ var args = []; | ||
} | ||
exports.reduceRightWithIndex = reduceRightWithIndex; | ||
/** | ||
@@ -337,11 +348,8 @@ * Create a `Record` with one key/value pair. | ||
} | ||
exports.traverseWithIndex = traverseWithIndex; | ||
function traverse(F) { | ||
return RR.traverse(F); | ||
} | ||
exports.traverse = traverse; | ||
function sequence(F) { | ||
return RR.sequence(F); | ||
} | ||
exports.sequence = sequence; | ||
/** | ||
@@ -391,3 +399,2 @@ * @category filtering | ||
} | ||
exports.partitionWithIndex = partitionWithIndex; | ||
/** | ||
@@ -413,7 +420,5 @@ * Maps a `Record` with an iterating function that takes key and value and | ||
} | ||
exports.filterWithIndex = filterWithIndex; | ||
function fromFoldable(M, F) { | ||
return RR.fromFoldable(M, F); | ||
} | ||
exports.fromFoldable = fromFoldable; | ||
/** | ||
@@ -447,3 +452,2 @@ * Alias of [`toArray`](#toArray). | ||
} | ||
exports.fromFoldableMap = fromFoldableMap; | ||
/** | ||
@@ -700,7 +704,5 @@ * Test if every value in a `Record` satisfies the predicate. | ||
} | ||
exports.reduce = reduce; | ||
function foldMap(O) { | ||
return 'compare' in O ? RR.foldMap(O) : RR.foldMap(S.Ord)(O); | ||
} | ||
exports.foldMap = foldMap; | ||
function reduceRight() { | ||
@@ -713,3 +715,2 @@ var args = []; | ||
} | ||
exports.reduceRight = reduceRight; | ||
/** | ||
@@ -764,3 +765,2 @@ * Compact a `Record` of `Option`s discarding the `None` values and | ||
} | ||
exports.getShow = getShow; | ||
/** | ||
@@ -767,0 +767,0 @@ * Given an `Eq` for the base type, it produces an `Eq` |
@@ -39,3 +39,3 @@ /** | ||
second: Refinement<A, C> | ||
) => <B extends A>(first: Refinement<A, B>) => Refinement<A, C | B> | ||
) => <B extends A>(first: Refinement<A, B>) => Refinement<A, B | C> | ||
/** | ||
@@ -42,0 +42,0 @@ * @since 2.11.0 |
@@ -25,3 +25,3 @@ import { Semiring } from './Semiring' | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>( | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...rings: { [K in keyof A]: Ring<A[K]> } | ||
@@ -28,0 +28,0 @@ ) => Ring<Readonly<A>> |
@@ -25,3 +25,3 @@ import * as M from './Magma' | ||
*/ | ||
export declare const min: <A>(O: Or.Ord<A>) => Semigroup<A> | ||
export declare const min: <A>(O: Ord<A>) => Semigroup<A> | ||
/** | ||
@@ -41,3 +41,3 @@ * Get a semigroup where `concat` will return the maximum, based on the provided order. | ||
*/ | ||
export declare const max: <A>(O: Or.Ord<A>) => Semigroup<A> | ||
export declare const max: <A>(O: Ord<A>) => Semigroup<A> | ||
/** | ||
@@ -82,3 +82,3 @@ * @category constructors | ||
export declare const struct: <A>(semigroups: { [K in keyof A]: Semigroup<A[K]> }) => Semigroup<{ | ||
readonly [K_1 in keyof A]: A[K_1] | ||
readonly [K in keyof A]: A[K] | ||
}> | ||
@@ -102,3 +102,3 @@ /** | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>( | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...semigroups: { [K in keyof A]: Semigroup<A[K]> } | ||
@@ -231,3 +231,3 @@ ) => Semigroup<Readonly<A>> | ||
*/ | ||
export declare const getJoinSemigroup: <A>(O: Or.Ord<A>) => Semigroup<A> | ||
export declare const getJoinSemigroup: <A>(O: Ord<A>) => Semigroup<A> | ||
/** | ||
@@ -240,3 +240,3 @@ * Use [`min`](#min) instead. | ||
*/ | ||
export declare const getMeetSemigroup: <A>(O: Or.Ord<A>) => Semigroup<A> | ||
export declare const getMeetSemigroup: <A>(O: Ord<A>) => Semigroup<A> | ||
/** | ||
@@ -243,0 +243,0 @@ * Use [`intercalate`](#intercalate) instead. |
@@ -26,3 +26,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.semigroupProduct = exports.semigroupSum = exports.semigroupString = exports.getFunctionSemigroup = exports.semigroupAny = exports.semigroupAll = exports.fold = exports.getIntercalateSemigroup = exports.getMeetSemigroup = exports.getJoinSemigroup = exports.getDualSemigroup = exports.getStructSemigroup = exports.getTupleSemigroup = exports.getFirstSemigroup = exports.getLastSemigroup = exports.getObjectSemigroup = exports.semigroupVoid = exports.concatAll = exports.last = exports.first = exports.intercalate = exports.tuple = exports.struct = exports.reverse = exports.constant = exports.max = exports.min = void 0; | ||
exports.semigroupProduct = exports.semigroupSum = exports.semigroupString = exports.getFunctionSemigroup = exports.semigroupAny = exports.semigroupAll = exports.getIntercalateSemigroup = exports.getMeetSemigroup = exports.getJoinSemigroup = exports.getDualSemigroup = exports.getStructSemigroup = exports.getTupleSemigroup = exports.getFirstSemigroup = exports.getLastSemigroup = exports.getObjectSemigroup = exports.semigroupVoid = exports.concatAll = exports.last = exports.first = exports.intercalate = exports.tuple = exports.struct = exports.reverse = exports.constant = exports.max = exports.min = void 0; | ||
exports.fold = fold; | ||
/** | ||
@@ -352,3 +353,2 @@ * If a type `A` can form a `Semigroup` it has an **associative** binary operation. | ||
} | ||
exports.fold = fold; | ||
/** | ||
@@ -355,0 +355,0 @@ * Use [`SemigroupAll`](./boolean.ts.html#SemigroupAll) instead. |
@@ -81,3 +81,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Separated<E, (a: A) => B>) => Separated<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Separated', E, (a: A) => B>) => import('./HKT').Kind2<'Separated', E, B> | ||
/** | ||
@@ -84,0 +86,0 @@ * @since 2.10.0 |
@@ -161,3 +161,3 @@ /** | ||
*/ | ||
export declare const fromArray: <A>(E: Eq<A>) => (as: A[]) => Set<A> | ||
export declare const fromArray: <A>(E: Eq<A>) => (as: Array<A>) => Set<A> | ||
/** | ||
@@ -221,3 +221,3 @@ * @since 2.0.0 | ||
*/ | ||
export declare const toArray: <A>(O: Ord<A>) => (set: Set<A>) => A[] | ||
export declare const toArray: <A>(O: Ord<A>) => (set: Set<A>) => Array<A> | ||
/** | ||
@@ -224,0 +224,0 @@ * Use [`isSubset`](#issubset) instead. |
@@ -26,3 +26,14 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.subset = exports.toArray = exports.elem = exports.isSubset = exports.every = exports.some = exports.size = exports.isEmpty = exports.empty = exports.filterMap = exports.separate = exports.compact = exports.fromArray = exports.toggle = exports.remove = exports.insert = exports.singleton = exports.reduceRight = exports.foldMap = exports.reduce = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.difference = exports.partitionMap = exports.intersection = exports.union = exports.partition = exports.filter = exports.chain = exports.map = exports.getEq = exports.getShow = void 0; | ||
exports.subset = exports.toArray = exports.elem = exports.isSubset = exports.every = exports.some = exports.size = exports.isEmpty = exports.empty = exports.compact = exports.fromArray = exports.toggle = exports.remove = exports.singleton = exports.reduceRight = exports.foldMap = exports.reduce = exports.getDifferenceMagma = exports.getIntersectionSemigroup = exports.getUnionMonoid = exports.getUnionSemigroup = exports.getEq = exports.getShow = void 0; | ||
exports.map = map; | ||
exports.chain = chain; | ||
exports.filter = filter; | ||
exports.partition = partition; | ||
exports.union = union; | ||
exports.intersection = intersection; | ||
exports.partitionMap = partitionMap; | ||
exports.difference = difference; | ||
exports.insert = insert; | ||
exports.separate = separate; | ||
exports.filterMap = filterMap; | ||
var function_1 = require("./function"); | ||
@@ -60,3 +71,2 @@ var RS = __importStar(require("./ReadonlySet")); | ||
} | ||
exports.map = map; | ||
/** | ||
@@ -81,3 +91,2 @@ * Composes computations in sequence, using the return value of one computation to determine the next computation. | ||
} | ||
exports.chain = chain; | ||
function filter(predicate) { | ||
@@ -97,3 +106,2 @@ return function (set) { | ||
} | ||
exports.filter = filter; | ||
function partition(predicate) { | ||
@@ -117,3 +125,2 @@ return function (set) { | ||
} | ||
exports.partition = partition; | ||
function union(E) { | ||
@@ -141,3 +148,2 @@ var elemE = (0, exports.elem)(E); | ||
} | ||
exports.union = union; | ||
function intersection(E) { | ||
@@ -162,3 +168,2 @@ var elemE = (0, exports.elem)(E); | ||
} | ||
exports.intersection = intersection; | ||
/** | ||
@@ -195,3 +200,2 @@ * @since 2.0.0 | ||
} | ||
exports.partitionMap = partitionMap; | ||
function difference(E) { | ||
@@ -207,3 +211,2 @@ var elemE = (0, exports.elem)(E); | ||
} | ||
exports.difference = difference; | ||
/** | ||
@@ -283,3 +286,2 @@ * @category instances | ||
} | ||
exports.insert = insert; | ||
/** | ||
@@ -364,3 +366,2 @@ * Delete a value from a set | ||
} | ||
exports.separate = separate; | ||
/** | ||
@@ -382,3 +383,2 @@ * @since 2.0.0 | ||
} | ||
exports.filterMap = filterMap; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -385,0 +385,0 @@ // utils |
@@ -12,7 +12,7 @@ import { ReadonlyRecord } from './ReadonlyRecord' | ||
*/ | ||
export declare const struct: <A>(shows: { [K in keyof A]: Show<A[K]> }) => Show<{ readonly [K_1 in keyof A]: A[K_1] }> | ||
export declare const struct: <A>(shows: { [K in keyof A]: Show<A[K]> }) => Show<{ readonly [K in keyof A]: A[K] }> | ||
/** | ||
* @since 2.10.0 | ||
*/ | ||
export declare const tuple: <A extends readonly unknown[]>( | ||
export declare const tuple: <A extends ReadonlyArray<unknown>>( | ||
...shows: { [K in keyof A]: Show<A[K]> } | ||
@@ -19,0 +19,0 @@ ) => Show<Readonly<A>> |
@@ -101,3 +101,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: State<E, (a: A) => B>) => State<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'State', E, (a: A) => B>) => import('./HKT').Kind2<'State', E, B> | ||
/** | ||
@@ -118,3 +120,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: State<E, B>) => <A>(first: State<E, A>) => State<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: State<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'State', E, A>) => import('./HKT').Kind2<'State', E, A> | ||
/** | ||
@@ -125,3 +129,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <E, B>(second: State<E, B>) => <A>(first: State<E, A>) => State<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: State<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'State', E, A>) => import('./HKT').Kind2<'State', E, B> | ||
/** | ||
@@ -175,7 +181,9 @@ * @category instances | ||
name: N | ||
) => <E, A>(fa: State<E, A>) => State<E, { readonly [K in N]: A }> | ||
) => <E, A>(fa: import('./HKT').Kind2<'State', E, A>) => import('./HKT').Kind2<'State', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: State<E, A>) => State<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'State', E, A> | ||
) => import('./HKT').Kind2<'State', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -192,4 +200,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => State<E, B> | ||
) => (ma: State<E, A>) => State<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'State', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'State', E, A> | ||
) => import('./HKT').Kind2<'State', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -201,3 +211,5 @@ * @since 2.8.0 | ||
fb: State<E, B> | ||
) => (fa: State<E, A>) => State<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'State', E, A> | ||
) => import('./HKT').Kind2<'State', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -220,3 +232,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(Applicative)`. | ||
f: (index: number, a: A) => State<S, B> | ||
) => (as: readonly A[]) => State<S, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => State<S, ReadonlyArray<B>> | ||
/** | ||
@@ -237,3 +249,5 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
*/ | ||
export declare const traverseArray: <A, S, B>(f: (a: A) => State<S, B>) => (as: readonly A[]) => State<S, readonly B[]> | ||
export declare const traverseArray: <A, S, B>( | ||
f: (a: A) => State<S, B> | ||
) => (as: ReadonlyArray<A>) => State<S, ReadonlyArray<B>> | ||
/** | ||
@@ -240,0 +254,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -173,3 +173,3 @@ /** | ||
*/ | ||
export declare const fromIOEitherK: <E, A extends readonly unknown[], B>( | ||
export declare const fromIOEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => IOEither<E, B> | ||
@@ -181,3 +181,3 @@ ) => <S, R = unknown>(...a: A) => StateReaderTaskEither<S, R, E, B> | ||
*/ | ||
export declare const fromTaskEitherK: <E, A extends readonly unknown[], B>( | ||
export declare const fromTaskEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => TaskEither<E, B> | ||
@@ -189,4 +189,4 @@ ) => <S, R = unknown>(...a: A) => StateReaderTaskEither<S, R, E, B> | ||
*/ | ||
export declare const fromReaderTaskEitherK: <R, E, A extends readonly unknown[], B>( | ||
f: (...a: A) => RTE.ReaderTaskEither<R, E, B> | ||
export declare const fromReaderTaskEitherK: <R, E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => ReaderTaskEither<R, E, B> | ||
) => <S>(...a: A) => StateReaderTaskEither<S, R, E, B> | ||
@@ -202,4 +202,4 @@ /** | ||
export declare const chainReaderTaskEitherKW: <R, E2, A, B>( | ||
f: (a: A) => RTE.ReaderTaskEither<R, E2, B> | ||
) => <S, E1>(ma: StateReaderTaskEither<S, R, E1, A>) => StateReaderTaskEither<S, R, E2 | E1, B> | ||
f: (a: A) => ReaderTaskEither<R, E2, B> | ||
) => <S, E1>(ma: StateReaderTaskEither<S, R, E1, A>) => StateReaderTaskEither<S, R, E1 | E2, B> | ||
/** | ||
@@ -418,3 +418,3 @@ * Alias of `flatMapReaderTaskEither`. | ||
that: () => StateReaderTaskEither<S, R2, E2, B> | ||
) => <R1, E1, A>(fa: StateReaderTaskEither<S, R1, E1, A>) => StateReaderTaskEither<S, R1 & R2, E2, B | A> | ||
) => <R1, E1, A>(fa: StateReaderTaskEither<S, R1, E1, A>) => StateReaderTaskEither<S, R1 & R2, E2, A | B> | ||
/** | ||
@@ -479,3 +479,5 @@ * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to | ||
a: A | ||
) => <S, R, E, B>(fab: StateReaderTaskEither<S, R, E, (a: A) => B>) => StateReaderTaskEither<S, R, E, B> | ||
) => <S, R, E, B>( | ||
fab: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, (a: A) => B> | ||
) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, B> | ||
/** | ||
@@ -498,3 +500,5 @@ * @category instances | ||
second: StateReaderTaskEither<S, R, E, B> | ||
) => <A>(first: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, A> | ||
) => <A>( | ||
first: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
/** | ||
@@ -517,3 +521,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
second: StateReaderTaskEither<S, R, E, B> | ||
) => <A>(first: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, B> | ||
) => <A>( | ||
first: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, B> | ||
/** | ||
@@ -1027,3 +1033,5 @@ * Less strict version of [`apSecond`](#apsecond). | ||
name: N | ||
) => <S, R, E, A>(fa: StateReaderTaskEither<S, R, E, A>) => StateReaderTaskEither<S, R, E, { readonly [K in N]: A }> | ||
) => <S, R, E, A>( | ||
fa: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
@@ -1033,4 +1041,10 @@ name: Exclude<N, keyof A>, | ||
) => <S, R, E>( | ||
fa: StateReaderTaskEither<S, R, E, A> | ||
) => StateReaderTaskEither<S, R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4< | ||
'StateReaderTaskEither', | ||
S, | ||
R, | ||
E, | ||
{ readonly [K in keyof A | N]: K extends keyof A ? A[K] : B } | ||
> | ||
export { | ||
@@ -1047,6 +1061,12 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => StateReaderTaskEither<S, R, E, B> | ||
f: (a: A) => import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, B> | ||
) => ( | ||
ma: StateReaderTaskEither<S, R, E, A> | ||
) => StateReaderTaskEither<S, R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
ma: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4< | ||
'StateReaderTaskEither', | ||
S, | ||
R, | ||
E, | ||
{ readonly [K in keyof A | N]: K extends keyof A ? A[K] : B } | ||
> | ||
/** | ||
@@ -1077,4 +1097,10 @@ * The `W` suffix (short for **W**idening) means that the environment types and the error types will be merged. | ||
) => ( | ||
fa: StateReaderTaskEither<S, R, E, A> | ||
) => StateReaderTaskEither<S, R, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
fa: import('./HKT').Kind4<'StateReaderTaskEither', S, R, E, A> | ||
) => import('./HKT').Kind4< | ||
'StateReaderTaskEither', | ||
S, | ||
R, | ||
E, | ||
{ readonly [K in keyof A | N]: K extends keyof A ? A[K] : B } | ||
> | ||
/** | ||
@@ -1118,3 +1144,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => StateReaderTaskEither<S, R, E, B> | ||
) => (as: readonly A[]) => StateReaderTaskEither<S, R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => StateReaderTaskEither<S, R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1137,3 +1163,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => StateReaderTaskEither<S, R, E, B> | ||
) => (as: readonly A[]) => StateReaderTaskEither<S, R, E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => StateReaderTaskEither<S, R, E, ReadonlyArray<B>> | ||
/** | ||
@@ -1140,0 +1166,0 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. |
@@ -26,5 +26,12 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Functor = exports.URI = exports.throwError = exports.alt = exports.altW = exports.flatten = exports.flattenW = exports.flatMapState = exports.flatMapReaderTaskEither = exports.flatMapOption = exports.flatMapEither = exports.flatMapIOEither = exports.flatMapReader = exports.flatMapTask = exports.flatMapIO = exports.flatMapTaskEither = exports.flatMap = exports.of = exports.apW = exports.ap = exports.mapLeft = exports.bimap = exports.map = exports.chainReaderTaskEitherK = exports.chainReaderTaskEitherKW = exports.fromReaderTaskEitherK = exports.fromTaskEitherK = exports.fromIOEitherK = exports.asksStateReaderTaskEither = exports.asksStateReaderTaskEitherW = exports.local = exports.fromReaderTaskEither = exports.fromReaderEither = exports.fromIOEither = exports.fromTaskEither = exports.fromState = exports.fromTask = exports.fromIO = exports.fromReader = exports.fromEither = exports.leftState = exports.rightState = exports.leftIO = exports.rightIO = exports.leftReader = exports.rightReader = exports.leftTask = exports.rightTask = exports.right = exports.left = void 0; | ||
exports.filterOrElse = exports.fromPredicate = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.chainFirstReaderKW = exports.chainFirstReaderK = exports.chainReaderKW = exports.chainReaderK = exports.fromReaderK = exports.asks = exports.ask = exports.Alt = exports.Bifunctor = exports.tapReader = exports.tapTask = exports.tapIO = exports.tapEither = exports.tap = exports.FromReader = exports.FromTask = exports.FromIO = exports.FromEither = exports.MonadThrow = exports.MonadTask = exports.MonadIO = exports.Monad = exports.chainStateK = exports.fromStateK = exports.gets = exports.modify = exports.put = exports.get = exports.FromState = exports.Chain = exports.Applicative = exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.asUnit = exports.as = void 0; | ||
exports.run = exports.execState = exports.evalState = exports.stateReaderTaskEitherSeq = exports.stateReaderTaskEither = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.execute = exports.evaluate = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.chainIOEitherK = exports.chainIOEitherKW = exports.chainTaskEitherK = exports.chainTaskEitherKW = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.fromEitherK = exports.filterOrElseW = void 0; | ||
exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.URI = exports.throwError = exports.alt = exports.altW = exports.flatten = exports.flattenW = exports.flatMapState = exports.flatMapReaderTaskEither = exports.flatMapOption = exports.flatMapEither = exports.flatMapIOEither = exports.flatMapReader = exports.flatMapTask = exports.flatMapIO = exports.flatMapTaskEither = exports.flatMap = exports.of = exports.apW = exports.ap = exports.mapLeft = exports.bimap = exports.map = exports.chainReaderTaskEitherK = exports.chainReaderTaskEitherKW = exports.fromReaderTaskEitherK = exports.fromTaskEitherK = exports.fromIOEitherK = exports.asksStateReaderTaskEither = exports.asksStateReaderTaskEitherW = exports.local = exports.fromReaderTaskEither = exports.fromReaderEither = exports.fromIOEither = exports.fromTaskEither = exports.fromState = exports.fromTask = exports.fromIO = exports.fromReader = exports.fromEither = exports.leftState = exports.rightState = exports.right = exports.left = void 0; | ||
exports.chainTaskEitherKW = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.chainFirstReaderKW = exports.chainFirstReaderK = exports.chainReaderKW = exports.chainReaderK = exports.fromReaderK = exports.asks = exports.ask = exports.Alt = exports.Bifunctor = exports.tapReader = exports.tapTask = exports.tapIO = exports.tapEither = exports.tap = exports.FromReader = exports.FromTask = exports.FromIO = exports.FromEither = exports.MonadThrow = exports.MonadTask = exports.MonadIO = exports.Monad = exports.chainStateK = exports.fromStateK = exports.gets = exports.modify = exports.put = exports.get = exports.FromState = exports.Chain = exports.Applicative = exports.apSecondW = exports.apSecond = exports.apFirstW = void 0; | ||
exports.execState = exports.evalState = exports.stateReaderTaskEitherSeq = exports.stateReaderTaskEither = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.execute = exports.evaluate = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.chainIOEitherK = exports.chainIOEitherKW = exports.chainTaskEitherK = void 0; | ||
exports.rightTask = rightTask; | ||
exports.leftTask = leftTask; | ||
exports.rightReader = rightReader; | ||
exports.leftReader = leftReader; | ||
exports.rightIO = rightIO; | ||
exports.leftIO = leftIO; | ||
exports.run = run; | ||
var Apply_1 = require("./Apply"); | ||
@@ -65,3 +72,2 @@ var chainable = __importStar(require("./Chain")); | ||
} | ||
exports.rightTask = rightTask; | ||
/** | ||
@@ -74,3 +80,2 @@ * @category constructors | ||
} | ||
exports.leftTask = leftTask; | ||
/** | ||
@@ -83,3 +88,2 @@ * @category constructors | ||
} | ||
exports.rightReader = rightReader; | ||
/** | ||
@@ -92,3 +96,2 @@ * @category constructors | ||
} | ||
exports.leftReader = leftReader; | ||
/** | ||
@@ -101,3 +104,2 @@ * @category constructors | ||
} | ||
exports.rightIO = rightIO; | ||
/** | ||
@@ -110,3 +112,2 @@ * @category constructors | ||
} | ||
exports.leftIO = leftIO; | ||
/** | ||
@@ -1202,2 +1203,1 @@ * @category constructors | ||
} | ||
exports.run = run; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getStateM = exports.execute = exports.evaluate = exports.fromF = exports.fromState = exports.flatMap = exports.chain = exports.ap = exports.map = exports.of = void 0; | ||
exports.of = of; | ||
exports.map = map; | ||
exports.ap = ap; | ||
exports.chain = chain; | ||
exports.flatMap = flatMap; | ||
exports.fromState = fromState; | ||
exports.fromF = fromF; | ||
exports.evaluate = evaluate; | ||
exports.execute = execute; | ||
exports.getStateM = getStateM; | ||
var function_1 = require("./function"); | ||
@@ -9,3 +18,2 @@ var ReadonlyTuple_1 = require("./ReadonlyTuple"); | ||
} | ||
exports.of = of; | ||
function map(F) { | ||
@@ -17,3 +25,2 @@ return function (f) { return function (fa) { return function (s) { return F.map(fa(s), function (_a) { | ||
} | ||
exports.map = map; | ||
function ap(M) { | ||
@@ -28,3 +35,2 @@ return function (fa) { return function (fab) { return function (s) { return M.chain(fab(s), function (_a) { | ||
} | ||
exports.ap = ap; | ||
function chain(M) { | ||
@@ -34,3 +40,2 @@ var flatMapM = flatMap(M); | ||
} | ||
exports.chain = chain; | ||
/** @internal */ | ||
@@ -43,11 +48,8 @@ function flatMap(M) { | ||
} | ||
exports.flatMap = flatMap; | ||
function fromState(F) { | ||
return function (sa) { return function (s) { return F.of(sa(s)); }; }; | ||
} | ||
exports.fromState = fromState; | ||
function fromF(F) { | ||
return function (ma) { return function (s) { return F.map(ma, function (a) { return [a, s]; }); }; }; | ||
} | ||
exports.fromF = fromF; | ||
function evaluate(F) { | ||
@@ -59,7 +61,5 @@ return function (s) { return function (ma) { return F.map(ma(s), function (_a) { | ||
} | ||
exports.evaluate = evaluate; | ||
function execute(F) { | ||
return function (s) { return function (ma) { return F.map(ma(s), ReadonlyTuple_1.snd); }; }; | ||
} | ||
exports.execute = execute; | ||
/** @deprecated */ | ||
@@ -88,2 +88,1 @@ /* istanbul ignore next */ | ||
} | ||
exports.getStateM = getStateM; |
@@ -102,3 +102,3 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Store<E, (a: A) => B>) => Store<E, B> | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Kind2<'Store', E, (a: A) => B>) => Kind2<'Store', E, B> | ||
/** | ||
@@ -105,0 +105,0 @@ * @category instances |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.store = exports.Comonad = exports.flap = exports.Functor = exports.URI = exports.map = exports.duplicate = exports.extract = exports.extend = exports.experiment = exports.peeks = exports.seeks = exports.seek = void 0; | ||
exports.store = exports.Comonad = exports.flap = exports.Functor = exports.URI = exports.map = exports.duplicate = exports.extract = exports.extend = void 0; | ||
exports.seek = seek; | ||
exports.seeks = seeks; | ||
exports.peeks = peeks; | ||
exports.experiment = experiment; | ||
var function_1 = require("./function"); | ||
@@ -14,3 +18,2 @@ var Functor_1 = require("./Functor"); | ||
} | ||
exports.seek = seek; | ||
/** | ||
@@ -24,3 +27,2 @@ * Reposition the focus at the specified position, which depends on the current position | ||
} | ||
exports.seeks = seeks; | ||
/** | ||
@@ -34,7 +36,5 @@ * Extract a value from a position which depends on the current position | ||
} | ||
exports.peeks = peeks; | ||
function experiment(F) { | ||
return function (f) { return function (wa) { return F.map(f(wa.pos), function (s) { return wa.peek(s); }); }; }; | ||
} | ||
exports.experiment = experiment; | ||
/* istanbul ignore next */ | ||
@@ -41,0 +41,0 @@ var _map = function (fa, f) { return (0, function_1.pipe)(fa, (0, exports.map)(f)); }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fanout = exports.splitStrong = exports.fanOut = exports.split = void 0; | ||
exports.split = split; | ||
exports.fanOut = fanOut; | ||
exports.splitStrong = splitStrong; | ||
exports.fanout = fanout; | ||
var function_1 = require("./function"); | ||
@@ -10,3 +13,2 @@ function split(S, C) { | ||
} | ||
exports.split = split; | ||
function fanOut(S, C) { | ||
@@ -18,10 +20,7 @@ var splitSC = split(S, C); | ||
} | ||
exports.fanOut = fanOut; | ||
function splitStrong(F) { | ||
return split(F, F); | ||
} | ||
exports.splitStrong = splitStrong; | ||
function fanout(F) { | ||
return fanOut(F, F); | ||
} | ||
exports.fanout = fanout; |
@@ -42,2 +42,2 @@ import { Semigroup } from './Semigroup' | ||
transformations: F | ||
) => (a: A) => { [K_1 in keyof F]: ReturnType<F[K_1]> } | ||
) => (a: A) => { [K in keyof F]: ReturnType<F[K]> } |
@@ -158,3 +158,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Task<(a: A) => B>) => Task<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'Task', (a: A) => B>) => import('./HKT').Kind<'Task', B> | ||
/** | ||
@@ -177,3 +179,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: Task<B>) => <A>(first: Task<A>) => Task<A> | ||
export declare const apFirst: <B>( | ||
second: Task<B> | ||
) => <A>(first: import('./HKT').Kind<'Task', A>) => import('./HKT').Kind<'Task', A> | ||
/** | ||
@@ -184,3 +188,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: Task<B>) => <A>(first: Task<A>) => Task<B> | ||
export declare const apSecond: <B>( | ||
second: Task<B> | ||
) => <A>(first: import('./HKT').Kind<'Task', A>) => import('./HKT').Kind<'Task', B> | ||
/** | ||
@@ -324,7 +330,11 @@ * Runs computations in parallel. | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: Task<A>) => Task<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: import('./HKT').Kind<'Task', A>) => import('./HKT').Kind<'Task', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: Task<A>) => Task<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'Task', A> | ||
) => import('./HKT').Kind<'Task', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -343,4 +353,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Task<B> | ||
) => (ma: Task<A>) => Task<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'Task', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'Task', A> | ||
) => import('./HKT').Kind<'Task', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -353,3 +365,5 @@ * @category do notation | ||
fb: Task<B> | ||
) => (fa: Task<A>) => Task<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'Task', A> | ||
) => import('./HKT').Kind<'Task', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -376,3 +390,3 @@ * @since 2.11.0 | ||
f: (index: number, a: A) => Task<B> | ||
) => (as: readonly A[]) => Task<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Task<ReadonlyArray<B>> | ||
/** | ||
@@ -395,3 +409,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => Task<B> | ||
) => (as: readonly A[]) => Task<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => Task<ReadonlyArray<B>> | ||
/** | ||
@@ -412,3 +426,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
*/ | ||
export declare const traverseArray: <A, B>(f: (a: A) => Task<B>) => (as: readonly A[]) => Task<readonly B[]> | ||
export declare const traverseArray: <A, B>(f: (a: A) => Task<B>) => (as: ReadonlyArray<A>) => Task<ReadonlyArray<B>> | ||
/** | ||
@@ -436,3 +450,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
*/ | ||
export declare const traverseSeqArray: <A, B>(f: (a: A) => Task<B>) => (as: readonly A[]) => Task<readonly B[]> | ||
export declare const traverseSeqArray: <A, B>(f: (a: A) => Task<B>) => (as: ReadonlyArray<A>) => Task<ReadonlyArray<B>> | ||
/** | ||
@@ -439,0 +453,0 @@ * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. |
@@ -26,4 +26,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.never = exports.FromTask = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.tapIO = exports.tap = exports.flatMapIO = exports.FromIO = exports.MonadTask = exports.fromTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecond = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getRaceMonoid = exports.URI = exports.flatten = exports.flatMap = exports.of = exports.ap = exports.map = exports.delay = exports.fromIO = void 0; | ||
exports.getMonoid = exports.getSemigroup = exports.taskSeq = exports.task = exports.chainFirst = exports.chain = void 0; | ||
exports.chainFirst = exports.chain = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.never = exports.FromTask = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.tapIO = exports.tap = exports.flatMapIO = exports.FromIO = exports.MonadTask = exports.fromTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecond = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.URI = exports.flatten = exports.flatMap = exports.of = exports.ap = exports.map = exports.fromIO = void 0; | ||
exports.getMonoid = exports.getSemigroup = exports.taskSeq = exports.task = void 0; | ||
exports.delay = delay; | ||
exports.getRaceMonoid = getRaceMonoid; | ||
/** | ||
@@ -95,3 +97,2 @@ * ```ts | ||
} | ||
exports.delay = delay; | ||
var _map = function (fa, f) { return (0, function_1.pipe)(fa, (0, exports.map)(f)); }; | ||
@@ -174,3 +175,2 @@ var _apPar = function (fab, fa) { return (0, function_1.pipe)(fab, (0, exports.ap)(fa)); }; | ||
} | ||
exports.getRaceMonoid = getRaceMonoid; | ||
/** | ||
@@ -177,0 +177,0 @@ * @category instances |
@@ -135,5 +135,5 @@ /** | ||
export declare const fold: <E, A, B>( | ||
onLeft: (e: E) => T.Task<B>, | ||
onRight: (a: A) => T.Task<B> | ||
) => (ma: TaskEither<E, A>) => T.Task<B> | ||
onLeft: (e: E) => Task<B>, | ||
onRight: (a: A) => Task<B> | ||
) => (ma: TaskEither<E, A>) => Task<B> | ||
/** | ||
@@ -158,5 +158,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, B, A, C>( | ||
onLeft: (e: E) => T.Task<B>, | ||
onRight: (a: A) => T.Task<C> | ||
) => (ma: TaskEither<E, A>) => T.Task<B | C> | ||
onLeft: (e: E) => Task<B>, | ||
onRight: (a: A) => Task<C> | ||
) => (ma: TaskEither<E, A>) => Task<B | C> | ||
/** | ||
@@ -202,3 +202,3 @@ * @category error handling | ||
*/ | ||
export declare const tryCatchK: <E, A extends readonly unknown[], B>( | ||
export declare const tryCatchK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => Promise<B>, | ||
@@ -309,3 +309,3 @@ onRejected: (reason: unknown) => E | ||
onNone: LazyArg<E> | ||
) => <A extends readonly unknown[], B>(f: (...a: A) => TaskOption<B>) => (...a: A) => TaskEither<E, B> | ||
) => <A extends ReadonlyArray<unknown>, B>(f: (...a: A) => TaskOption<B>) => (...a: A) => TaskEither<E, B> | ||
/** | ||
@@ -321,3 +321,3 @@ * Use `flatMapTaskOption`. | ||
onNone: LazyArg<E2> | ||
) => <A, B>(f: (a: A) => TaskOption<B>) => <E1>(ma: TaskEither<E1, A>) => TaskEither<E2 | E1, B> | ||
) => <A, B>(f: (a: A) => TaskOption<B>) => <E1>(ma: TaskEither<E1, A>) => TaskEither<E1 | E2, B> | ||
/** | ||
@@ -336,3 +336,3 @@ * Use `flatMapTaskOption`. | ||
*/ | ||
export declare const fromIOEitherK: <E, A extends readonly unknown[], B>( | ||
export declare const fromIOEitherK: <E, A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => IOEither<E, B> | ||
@@ -591,3 +591,3 @@ ) => (...a: A) => TaskEither<E, B> | ||
*/ | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<'TaskEither', E> | ||
export declare const getCompactable: <E>(M: Monoid<E>) => Compactable2C<URI, E> | ||
/** | ||
@@ -624,3 +624,5 @@ * @category filtering | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: TaskEither<E, (a: A) => B>) => TaskEither<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'TaskEither', E, (a: A) => B>) => import('./HKT').Kind2<'TaskEither', E, B> | ||
/** | ||
@@ -643,3 +645,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <E, B>(second: TaskEither<E, B>) => <A>(first: TaskEither<E, A>) => TaskEither<E, A> | ||
export declare const apFirst: <E, B>( | ||
second: TaskEither<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'TaskEither', E, A>) => import('./HKT').Kind2<'TaskEither', E, A> | ||
/** | ||
@@ -660,3 +664,5 @@ * Less strict version of [`apFirst`](#apfirst). | ||
*/ | ||
export declare const apSecond: <E, B>(second: TaskEither<E, B>) => <A>(first: TaskEither<E, A>) => TaskEither<E, B> | ||
export declare const apSecond: <E, B>( | ||
second: TaskEither<E, B> | ||
) => <A>(first: import('./HKT').Kind2<'TaskEither', E, A>) => import('./HKT').Kind2<'TaskEither', E, B> | ||
/** | ||
@@ -1155,3 +1161,3 @@ * Less strict version of [`apSecond`](#apsecond). | ||
use: (a: A) => TaskEither<E, B>, | ||
release: (a: A, e: E.Either<E, B>) => TaskEither<E, void> | ||
release: (a: A, e: Either<E, B>) => TaskEither<E, void> | ||
) => TaskEither<E, B> | ||
@@ -1181,7 +1187,11 @@ /** | ||
name: N | ||
) => <E, A>(fa: TaskEither<E, A>) => TaskEither<E, { readonly [K in N]: A }> | ||
) => <E, A>( | ||
fa: import('./HKT').Kind2<'TaskEither', E, A> | ||
) => import('./HKT').Kind2<'TaskEither', E, { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => <E>(fa: TaskEither<E, A>) => TaskEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => <E>( | ||
fa: import('./HKT').Kind2<'TaskEither', E, A> | ||
) => import('./HKT').Kind2<'TaskEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -1200,4 +1210,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => TaskEither<E, B> | ||
) => (ma: TaskEither<E, A>) => TaskEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind2<'TaskEither', E, B> | ||
) => ( | ||
ma: import('./HKT').Kind2<'TaskEither', E, A> | ||
) => import('./HKT').Kind2<'TaskEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1225,3 +1237,5 @@ * The `W` suffix (short for **W**idening) means that the error types will be merged. | ||
fb: TaskEither<E, B> | ||
) => (fa: TaskEither<E, A>) => TaskEither<E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind2<'TaskEither', E, A> | ||
) => import('./HKT').Kind2<'TaskEither', E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -1265,3 +1279,3 @@ * Less strict version of [`apS`](#aps). | ||
f: (index: number, a: A) => TaskEither<E, B> | ||
) => (as: readonly A[]) => TaskEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1284,3 +1298,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => TaskEither<E, B> | ||
) => (as: readonly A[]) => TaskEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1303,3 +1317,3 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. | ||
f: (a: A) => TaskEither<E, B> | ||
) => (as: readonly A[]) => TaskEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1329,3 +1343,3 @@ * Equivalent to `ReadonlyArray#sequence(Applicative)`. | ||
f: (a: A) => TaskEither<E, B> | ||
) => (as: readonly A[]) => TaskEither<E, readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskEither<E, ReadonlyArray<B>> | ||
/** | ||
@@ -1332,0 +1346,0 @@ * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`. |
@@ -63,4 +63,9 @@ "use strict"; | ||
exports.throwError = exports.of = exports.altW = exports.alt = exports.flatten = exports.flattenW = exports.flatMap = exports.apW = exports.ap = exports.mapLeft = exports.mapError = exports.bimap = exports.mapBoth = exports.map = exports.fromIOEitherK = exports.chainTaskOptionK = exports.chainTaskOptionKW = exports.fromTaskOptionK = exports.swap = exports.orLeft = exports.orElseFirstTaskK = exports.orElseFirstIOK = exports.tapError = exports.orElseW = exports.orElse = exports.chainNullableK = exports.fromNullableK = exports.fromNullable = exports.toUnion = exports.tryCatchK = exports.tryCatch = exports.getOrElseW = exports.getOrElse = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromTaskOption = exports.fromIOEither = exports.fromEither = exports.fromTask = exports.fromIO = exports.leftIO = exports.rightIO = exports.leftTask = exports.rightTask = exports.right = exports.left = void 0; | ||
exports.fromPredicate = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.flatMapTaskOption = exports.flatMapIOEither = exports.flatMapTask = exports.flatMapIO = exports.flatMapEither = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.Alt = exports.Bifunctor = exports.tapTask = exports.tapIO = exports.tapEither = exports.tap = exports.FromTask = exports.FromIO = exports.FromEither = exports.MonadThrow = exports.MonadTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getFilterable = exports.getCompactable = exports.getAltTaskValidation = exports.getApplicativeTaskValidation = exports.URI = void 0; | ||
exports.getTaskValidation = exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.taskEitherSeq = exports.taskEither = exports.orElseFirstW = exports.orElseFirst = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.bracketW = exports.bracket = exports.taskify = exports.chainIOEitherK = exports.chainIOEitherKW = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = void 0; | ||
exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainFirstEitherKW = exports.chainFirstEitherK = exports.chainEitherKW = exports.chainEitherK = exports.flatMapTaskOption = exports.flatMapIOEither = exports.flatMapTask = exports.flatMapIO = exports.flatMapEither = exports.flatMapOption = exports.flatMapNullable = exports.liftOption = exports.liftNullable = exports.chainOptionKW = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.Alt = exports.Bifunctor = exports.tapTask = exports.tapIO = exports.tapEither = exports.tap = exports.FromTask = exports.FromIO = exports.FromEither = exports.MonadThrow = exports.MonadTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecondW = exports.apSecond = exports.apFirstW = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.asUnit = exports.as = exports.Functor = exports.getCompactable = exports.URI = void 0; | ||
exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.taskEitherSeq = exports.taskEither = exports.orElseFirstW = exports.orElseFirst = exports.chainFirstW = exports.chainFirst = exports.chainW = exports.chain = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.let = exports.bindTo = exports.Do = exports.bracketW = exports.bracket = exports.chainIOEitherK = exports.chainIOEitherKW = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = void 0; | ||
exports.getApplicativeTaskValidation = getApplicativeTaskValidation; | ||
exports.getAltTaskValidation = getAltTaskValidation; | ||
exports.getFilterable = getFilterable; | ||
exports.taskify = taskify; | ||
exports.getTaskValidation = getTaskValidation; | ||
var Applicative_1 = require("./Applicative"); | ||
@@ -615,3 +620,2 @@ var Apply_1 = require("./Apply"); | ||
} | ||
exports.getApplicativeTaskValidation = getApplicativeTaskValidation; | ||
/** | ||
@@ -635,3 +639,2 @@ * The default [`Alt`](#alt) instance returns the last error, if you want to | ||
} | ||
exports.getAltTaskValidation = getAltTaskValidation; | ||
/** | ||
@@ -674,3 +677,2 @@ * @category filtering | ||
} | ||
exports.getFilterable = getFilterable; | ||
/** | ||
@@ -1194,3 +1196,2 @@ * @category instances | ||
} | ||
exports.taskify = taskify; | ||
/** | ||
@@ -1515,2 +1516,1 @@ * Make sure that a resource is cleaned up in the event of an exception (\*). The release action is called regardless of | ||
} | ||
exports.getTaskValidation = getTaskValidation; |
@@ -103,6 +103,3 @@ /** | ||
*/ | ||
export declare const fold: <B, A>( | ||
onNone: () => T.Task<B>, | ||
onSome: (a: A) => T.Task<B> | ||
) => (ma: TaskOption<A>) => T.Task<B> | ||
export declare const fold: <B, A>(onNone: () => Task<B>, onSome: (a: A) => Task<B>) => (ma: TaskOption<A>) => Task<B> | ||
/** | ||
@@ -127,5 +124,5 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <B, C, A>( | ||
onNone: () => T.Task<B>, | ||
onSome: (a: A) => T.Task<C> | ||
) => (ma: TaskOption<A>) => T.Task<B | C> | ||
onNone: () => Task<B>, | ||
onSome: (a: A) => Task<C> | ||
) => (ma: TaskOption<A>) => Task<B | C> | ||
/** | ||
@@ -165,3 +162,3 @@ * @category error handling | ||
*/ | ||
export declare const tryCatchK: <A extends readonly unknown[], B>( | ||
export declare const tryCatchK: <A extends ReadonlyArray<unknown>, B>( | ||
f: (...a: A) => Promise<B> | ||
@@ -345,3 +342,5 @@ ) => (...a: A) => TaskOption<B> | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: TaskOption<(a: A) => B>) => TaskOption<B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <B>(fab: import('./HKT').Kind<'TaskOption', (a: A) => B>) => import('./HKT').Kind<'TaskOption', B> | ||
/** | ||
@@ -364,3 +363,5 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: TaskOption<B>) => <A>(first: TaskOption<A>) => TaskOption<A> | ||
export declare const apFirst: <B>( | ||
second: TaskOption<B> | ||
) => <A>(first: import('./HKT').Kind<'TaskOption', A>) => import('./HKT').Kind<'TaskOption', A> | ||
/** | ||
@@ -371,3 +372,5 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: TaskOption<B>) => <A>(first: TaskOption<A>) => TaskOption<B> | ||
export declare const apSecond: <B>( | ||
second: TaskOption<B> | ||
) => <A>(first: import('./HKT').Kind<'TaskOption', A>) => import('./HKT').Kind<'TaskOption', B> | ||
/** | ||
@@ -532,3 +535,3 @@ * Runs computations in parallel. | ||
*/ | ||
export declare const guard: (b: boolean) => TaskOption<void> | ||
export declare const guard: (b: boolean) => import('./HKT').Kind<'TaskOption', void> | ||
/** | ||
@@ -634,7 +637,9 @@ * @category instances | ||
name: N | ||
) => <A>(fa: TaskOption<A>) => TaskOption<{ readonly [K in N]: A }> | ||
) => <A>(fa: import('./HKT').Kind<'TaskOption', A>) => import('./HKT').Kind<'TaskOption', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: TaskOption<A>) => TaskOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'TaskOption', A> | ||
) => import('./HKT').Kind<'TaskOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -653,4 +658,6 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => TaskOption<B> | ||
) => (ma: TaskOption<A>) => TaskOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => import('./HKT').Kind<'TaskOption', B> | ||
) => ( | ||
ma: import('./HKT').Kind<'TaskOption', A> | ||
) => import('./HKT').Kind<'TaskOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -663,3 +670,5 @@ * @category do notation | ||
fb: TaskOption<B> | ||
) => (fa: TaskOption<A>) => TaskOption<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => ( | ||
fa: import('./HKT').Kind<'TaskOption', A> | ||
) => import('./HKT').Kind<'TaskOption', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -686,3 +695,3 @@ * @since 2.11.0 | ||
f: (index: number, a: A) => TaskOption<B> | ||
) => (as: readonly A[]) => TaskOption<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskOption<ReadonlyArray<B>> | ||
/** | ||
@@ -705,3 +714,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(ApplicativeSeq)`. | ||
f: (index: number, a: A) => TaskOption<B> | ||
) => (as: readonly A[]) => TaskOption<readonly B[]> | ||
) => (as: ReadonlyArray<A>) => TaskOption<ReadonlyArray<B>> | ||
/** | ||
@@ -708,0 +717,0 @@ * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`. |
@@ -134,6 +134,6 @@ /** | ||
export declare const fold: <E, B, A>( | ||
onLeft: (e: E) => T.Task<B>, | ||
onRight: (a: A) => T.Task<B>, | ||
onBoth: (e: E, a: A) => T.Task<B> | ||
) => (fa: TaskThese<E, A>) => T.Task<B> | ||
onLeft: (e: E) => Task<B>, | ||
onRight: (a: A) => Task<B>, | ||
onBoth: (e: E, a: A) => Task<B> | ||
) => (fa: TaskThese<E, A>) => Task<B> | ||
/** | ||
@@ -159,6 +159,6 @@ * Less strict version of [`matchE`](#matche). | ||
export declare const foldW: <E, B, A, C, D>( | ||
onLeft: (e: E) => T.Task<B>, | ||
onRight: (a: A) => T.Task<C>, | ||
onBoth: (e: E, a: A) => T.Task<D> | ||
) => (fa: TaskThese<E, A>) => T.Task<B | C | D> | ||
onLeft: (e: E) => Task<B>, | ||
onRight: (a: A) => Task<C>, | ||
onBoth: (e: E, a: A) => Task<D> | ||
) => (fa: TaskThese<E, A>) => Task<B | C | D> | ||
/** | ||
@@ -214,3 +214,3 @@ * @since 2.4.0 | ||
*/ | ||
export declare const getApply: <E>(A: Apply1<T.URI>, S: Semigroup<E>) => Apply2C<'TaskThese', E> | ||
export declare const getApply: <E>(A: Apply1<T.URI>, S: Semigroup<E>) => Apply2C<URI, E> | ||
/** | ||
@@ -240,3 +240,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: TaskThese<E, (a: A) => B>) => TaskThese<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'TaskThese', E, (a: A) => B>) => import('./HKT').Kind2<'TaskThese', E, B> | ||
/** | ||
@@ -341,3 +343,3 @@ * @category instances | ||
S: Semigroup<E> | ||
) => <A, B>(f: (index: number, a: A) => TaskThese<E, B>) => (as: readonly A[]) => TaskThese<E, readonly B[]> | ||
) => <A, B>(f: (index: number, a: A) => TaskThese<E, B>) => (as: ReadonlyArray<A>) => TaskThese<E, ReadonlyArray<B>> | ||
/** | ||
@@ -362,3 +364,3 @@ * Equivalent to `ReadonlyNonEmptyArray#traverseWithIndex(getApplicative(T.ApplicativeSeq, S))`. | ||
S: Semigroup<E> | ||
) => <A, B>(f: (index: number, a: A) => TaskThese<E, B>) => (as: readonly A[]) => TaskThese<E, readonly B[]> | ||
) => <A, B>(f: (index: number, a: A) => TaskThese<E, B>) => (as: ReadonlyArray<A>) => TaskThese<E, ReadonlyArray<B>> | ||
/** | ||
@@ -387,3 +389,3 @@ * Use [`Functor`](#functor) instead. | ||
*/ | ||
export declare const toTuple: <E, A>(e: E, a: A) => (fa: TaskThese<E, A>) => T.Task<[E, A]> | ||
export declare const toTuple: <E, A>(e: E, a: A) => (fa: TaskThese<E, A>) => Task<[E, A]> | ||
/** | ||
@@ -390,0 +392,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -26,4 +26,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bifunctorTaskThese = exports.functorTaskThese = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.toTuple2 = exports.fromTaskK = exports.FromTask = exports.fromIOK = exports.FromIO = exports.fromTheseK = exports.FromThese = exports.fromPredicate = exports.fromOptionK = exports.fromOption = exports.FromEither = exports.Bifunctor = exports.Pointed = exports.flap = exports.Functor = exports.getMonad = exports.getChain = exports.getApplicative = exports.getApply = exports.URI = exports.of = exports.mapLeft = exports.bimap = exports.map = exports.swap = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromTask = exports.fromIOEither = exports.fromIO = exports.fromThese = exports.fromEither = exports.leftIO = exports.rightIO = exports.leftTask = exports.rightTask = exports.both = exports.right = exports.left = void 0; | ||
exports.getSemigroup = exports.taskThese = exports.toTuple = void 0; | ||
exports.getSemigroup = exports.taskThese = exports.toTuple = exports.bifunctorTaskThese = exports.functorTaskThese = exports.traverseReadonlyArrayWithIndexSeq = exports.traverseReadonlyNonEmptyArrayWithIndexSeq = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.toTuple2 = exports.fromTaskK = exports.FromTask = exports.fromIOK = exports.FromIO = exports.fromTheseK = exports.FromThese = exports.fromPredicate = exports.fromOptionK = exports.fromOption = exports.FromEither = exports.Bifunctor = exports.Pointed = exports.flap = exports.Functor = exports.getApply = exports.URI = exports.of = exports.mapLeft = exports.bimap = exports.map = exports.swap = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromTask = exports.fromIOEither = exports.fromIO = exports.fromThese = exports.fromEither = exports.leftIO = exports.rightIO = exports.leftTask = exports.rightTask = exports.both = exports.right = exports.left = void 0; | ||
exports.getApplicative = getApplicative; | ||
exports.getChain = getChain; | ||
exports.getMonad = getMonad; | ||
var Apply_1 = require("./Apply"); | ||
@@ -217,3 +219,2 @@ var FromEither_1 = require("./FromEither"); | ||
} | ||
exports.getApplicative = getApplicative; | ||
/** | ||
@@ -234,3 +235,2 @@ * @category instances | ||
} | ||
exports.getChain = getChain; | ||
/** | ||
@@ -254,3 +254,2 @@ * @category instances | ||
} | ||
exports.getMonad = getMonad; | ||
/** | ||
@@ -257,0 +256,0 @@ * @category instances |
@@ -161,3 +161,3 @@ /** | ||
*/ | ||
export declare const getApply: <E>(S: Semigroup<E>) => Apply2C<'These', E> | ||
export declare const getApply: <E>(S: Semigroup<E>) => Apply2C<URI, E> | ||
/** | ||
@@ -354,3 +354,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: These<E, (a: A) => B>) => These<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'These', E, (a: A) => B>) => import('./HKT').Kind2<'These', E, B> | ||
/** | ||
@@ -458,3 +460,3 @@ * @category instances | ||
S: Semigroup<E> | ||
) => <A, B>(f: (index: number, a: A) => These<E, B>) => (as: readonly A[]) => These<E, readonly B[]> | ||
) => <A, B>(f: (index: number, a: A) => These<E, B>) => (as: ReadonlyArray<A>) => These<E, ReadonlyArray<B>> | ||
/** | ||
@@ -461,0 +463,0 @@ * This instance is deprecated, use small, specific instances instead. |
@@ -26,4 +26,19 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.toTuple = exports.toTuple2 = exports.exists = exports.elem = exports.fromOptionK = exports.fromOption = exports.fromPredicate = exports.FromEither = exports.Traversable = exports.Foldable = exports.FromThese = exports.Bifunctor = exports.Pointed = exports.flap = exports.Functor = exports.URI = exports.of = exports.sequence = exports.traverse = exports.reduceRight = exports.foldMap = exports.reduce = exports.map = exports.mapLeft = exports.bimap = exports.fromOptions = exports.getRightOnly = exports.getLeftOnly = exports.rightOrBoth = exports.leftOrBoth = exports.getRight = exports.getLeft = exports.getMonad = exports.getChain = exports.getApplicative = exports.getApply = exports.getSemigroup = exports.getEq = exports.getShow = exports.swap = exports.fold = exports.match = exports.foldW = exports.matchW = exports.both = exports.right = exports.left = exports.isBoth = exports.isRight = exports.isLeft = void 0; | ||
exports.these = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = void 0; | ||
exports.these = exports.traverseReadonlyArrayWithIndex = exports.traverseReadonlyNonEmptyArrayWithIndex = exports.ApT = exports.toTuple = exports.toTuple2 = exports.exists = exports.elem = exports.fromOptionK = exports.fromOption = exports.fromPredicate = exports.FromEither = exports.Traversable = exports.Foldable = exports.FromThese = exports.Bifunctor = exports.Pointed = exports.flap = exports.Functor = exports.URI = exports.of = exports.sequence = exports.traverse = exports.reduceRight = exports.foldMap = exports.reduce = exports.map = exports.mapLeft = exports.bimap = exports.fromOptions = exports.getApply = exports.swap = exports.fold = exports.match = exports.foldW = exports.matchW = exports.isRight = exports.isLeft = void 0; | ||
exports.isBoth = isBoth; | ||
exports.left = left; | ||
exports.right = right; | ||
exports.both = both; | ||
exports.getShow = getShow; | ||
exports.getEq = getEq; | ||
exports.getSemigroup = getSemigroup; | ||
exports.getApplicative = getApplicative; | ||
exports.getChain = getChain; | ||
exports.getMonad = getMonad; | ||
exports.getLeft = getLeft; | ||
exports.getRight = getRight; | ||
exports.leftOrBoth = leftOrBoth; | ||
exports.rightOrBoth = rightOrBoth; | ||
exports.getLeftOnly = getLeftOnly; | ||
exports.getRightOnly = getRightOnly; | ||
var Eq_1 = require("./Eq"); | ||
@@ -62,3 +77,2 @@ var FromEither_1 = require("./FromEither"); | ||
} | ||
exports.isBoth = isBoth; | ||
// ------------------------------------------------------------------------------------- | ||
@@ -74,3 +88,2 @@ // constructors | ||
} | ||
exports.left = left; | ||
/** | ||
@@ -83,3 +96,2 @@ * @category constructors | ||
} | ||
exports.right = right; | ||
/** | ||
@@ -92,3 +104,2 @@ * @category constructors | ||
} | ||
exports.both = both; | ||
/** | ||
@@ -147,3 +158,2 @@ * Less strict version of [`match`](#match). | ||
} | ||
exports.getShow = getShow; | ||
/** | ||
@@ -162,3 +172,2 @@ * @category instances | ||
} | ||
exports.getEq = getEq; | ||
/** | ||
@@ -191,3 +200,2 @@ * @category instances | ||
} | ||
exports.getSemigroup = getSemigroup; | ||
/** | ||
@@ -236,3 +244,2 @@ * @category instances | ||
} | ||
exports.getApplicative = getApplicative; | ||
/** | ||
@@ -266,3 +273,2 @@ * @category instances | ||
} | ||
exports.getChain = getChain; | ||
/** | ||
@@ -284,3 +290,2 @@ * @category instances | ||
} | ||
exports.getMonad = getMonad; | ||
/** | ||
@@ -303,3 +308,2 @@ * Returns an `E` value if possible | ||
} | ||
exports.getLeft = getLeft; | ||
/** | ||
@@ -322,3 +326,2 @@ * Returns an `A` value if possible | ||
} | ||
exports.getRight = getRight; | ||
// TODO: make lazy in v3 | ||
@@ -339,3 +342,2 @@ /** | ||
} | ||
exports.leftOrBoth = leftOrBoth; | ||
// TODO: make lazy in v3 | ||
@@ -356,3 +358,2 @@ /** | ||
} | ||
exports.rightOrBoth = rightOrBoth; | ||
/** | ||
@@ -375,3 +376,2 @@ * Returns the `E` value if and only if the value is constructed with `Left` | ||
} | ||
exports.getLeftOnly = getLeftOnly; | ||
/** | ||
@@ -394,3 +394,2 @@ * Returns the `A` value if and only if the value is constructed with `Right` | ||
} | ||
exports.getRightOnly = getRightOnly; | ||
/** | ||
@@ -397,0 +396,0 @@ * Takes a pair of `Option`s and attempts to create a `These` from them |
@@ -26,3 +26,17 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getTheseM = exports.toTuple2 = exports.swap = exports.matchE = exports.match = exports.mapLeft = exports.bimap = exports.chain = exports.ap = exports.map = exports.leftF = exports.rightF = exports.both = exports.left = exports.right = void 0; | ||
exports.right = right; | ||
exports.left = left; | ||
exports.both = both; | ||
exports.rightF = rightF; | ||
exports.leftF = leftF; | ||
exports.map = map; | ||
exports.ap = ap; | ||
exports.chain = chain; | ||
exports.bimap = bimap; | ||
exports.mapLeft = mapLeft; | ||
exports.match = match; | ||
exports.matchE = matchE; | ||
exports.swap = swap; | ||
exports.toTuple2 = toTuple2; | ||
exports.getTheseM = getTheseM; | ||
/** | ||
@@ -38,27 +52,20 @@ * @since 2.4.0 | ||
} | ||
exports.right = right; | ||
function left(F) { | ||
return (0, function_1.flow)(T.left, F.of); | ||
} | ||
exports.left = left; | ||
function both(F) { | ||
return (0, function_1.flow)(T.both, F.of); | ||
} | ||
exports.both = both; | ||
function rightF(F) { | ||
return function (fa) { return F.map(fa, T.right); }; | ||
} | ||
exports.rightF = rightF; | ||
function leftF(F) { | ||
return function (fe) { return F.map(fe, T.left); }; | ||
} | ||
exports.leftF = leftF; | ||
function map(F) { | ||
return (0, Functor_1.map)(F, T.Functor); | ||
} | ||
exports.map = map; | ||
function ap(F, S) { | ||
return (0, Apply_1.ap)(F, T.getApply(S)); | ||
} | ||
exports.ap = ap; | ||
function chain(M, S) { | ||
@@ -72,27 +79,20 @@ var _left = left(M); | ||
} | ||
exports.chain = chain; | ||
function bimap(F) { | ||
return function (f, g) { return function (fea) { return F.map(fea, T.bimap(f, g)); }; }; | ||
} | ||
exports.bimap = bimap; | ||
function mapLeft(F) { | ||
return function (f) { return function (fea) { return F.map(fea, T.mapLeft(f)); }; }; | ||
} | ||
exports.mapLeft = mapLeft; | ||
function match(F) { | ||
return function (onLeft, onRight, onBoth) { return function (ma) { return F.map(ma, T.match(onLeft, onRight, onBoth)); }; }; | ||
} | ||
exports.match = match; | ||
function matchE(M) { | ||
return function (onLeft, onRight, onBoth) { return function (ma) { return M.chain(ma, T.match(onLeft, onRight, onBoth)); }; }; | ||
} | ||
exports.matchE = matchE; | ||
function swap(F) { | ||
return function (ma) { return F.map(ma, T.swap); }; | ||
} | ||
exports.swap = swap; | ||
function toTuple2(F) { | ||
return function (e, a) { return function (fa) { return F.map(fa, T.toTuple2(e, a)); }; }; | ||
} | ||
exports.toTuple2 = toTuple2; | ||
/** @deprecated */ | ||
@@ -135,2 +135,1 @@ /* istanbul ignore next */ | ||
} | ||
exports.getTheseM = getTheseM; |
@@ -75,3 +75,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Traced<E, (a: A) => B>) => Traced<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Traced', E, (a: A) => B>) => import('./HKT').Kind2<'Traced', E, B> | ||
/** | ||
@@ -78,0 +80,0 @@ * Use [`Functor`](#functor) instead. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.traced = exports.flap = exports.Functor = exports.URI = exports.map = exports.getComonad = exports.censor = exports.listens = exports.listen = exports.tracks = void 0; | ||
exports.traced = exports.flap = exports.Functor = exports.URI = exports.map = void 0; | ||
exports.tracks = tracks; | ||
exports.listen = listen; | ||
exports.listens = listens; | ||
exports.censor = censor; | ||
exports.getComonad = getComonad; | ||
var function_1 = require("./function"); | ||
@@ -15,3 +20,2 @@ var Functor_1 = require("./Functor"); | ||
} | ||
exports.tracks = tracks; | ||
/** | ||
@@ -25,3 +29,2 @@ * Get the current position | ||
} | ||
exports.listen = listen; | ||
/** | ||
@@ -35,3 +38,2 @@ * Get a value which depends on the current position | ||
} | ||
exports.listens = listens; | ||
/** | ||
@@ -45,3 +47,2 @@ * Apply a function to the current position | ||
} | ||
exports.censor = censor; | ||
/** | ||
@@ -66,3 +67,2 @@ * @category instances | ||
} | ||
exports.getComonad = getComonad; | ||
/* istanbul ignore next */ | ||
@@ -69,0 +69,0 @@ var _map = function (fa, f) { return (0, function_1.pipe)(fa, (0, exports.map)(f)); }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getTraversableComposition = exports.sequence = exports.traverse = void 0; | ||
exports.traverse = traverse; | ||
exports.sequence = sequence; | ||
exports.getTraversableComposition = getTraversableComposition; | ||
var Foldable_1 = require("./Foldable"); | ||
@@ -14,3 +16,2 @@ var function_1 = require("./function"); | ||
} | ||
exports.traverse = traverse; | ||
function sequence(T, G) { | ||
@@ -23,3 +24,2 @@ return function (F) { | ||
} | ||
exports.sequence = sequence; | ||
/** @deprecated */ | ||
@@ -46,2 +46,1 @@ function getTraversableComposition(F, G) { | ||
} | ||
exports.getTraversableComposition = getTraversableComposition; |
@@ -270,3 +270,3 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <B>(fab: Tree<(a: A) => B>) => Tree<B> | ||
export declare const flap: <A>(a: A) => <B>(fab: Kind<'Tree', (a: A) => B>) => Kind<'Tree', B> | ||
/** | ||
@@ -287,3 +287,3 @@ * @category instances | ||
*/ | ||
export declare const apFirst: <B>(second: Tree<B>) => <A>(first: Tree<A>) => Tree<A> | ||
export declare const apFirst: <B>(second: Tree<B>) => <A>(first: Kind<'Tree', A>) => Kind<'Tree', A> | ||
/** | ||
@@ -294,3 +294,3 @@ * Combine two effectful actions, keeping only the result of the second. | ||
*/ | ||
export declare const apSecond: <B>(second: Tree<B>) => <A>(first: Tree<A>) => Tree<B> | ||
export declare const apSecond: <B>(second: Tree<B>) => <A>(first: Kind<'Tree', A>) => Kind<'Tree', B> | ||
/** | ||
@@ -342,7 +342,9 @@ * @category instances | ||
*/ | ||
export declare const bindTo: <N extends string>(name: N) => <A>(fa: Tree<A>) => Tree<{ readonly [K in N]: A }> | ||
export declare const bindTo: <N extends string>( | ||
name: N | ||
) => <A>(fa: Kind<'Tree', A>) => Kind<'Tree', { readonly [K in N]: A }> | ||
declare const let_: <N extends string, A, B>( | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => B | ||
) => (fa: Tree<A>) => Tree<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => (fa: Kind<'Tree', A>) => Kind<'Tree', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
export { | ||
@@ -361,4 +363,4 @@ /** | ||
name: Exclude<N, keyof A>, | ||
f: (a: A) => Tree<B> | ||
) => (ma: Tree<A>) => Tree<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
f: (a: A) => Kind<'Tree', B> | ||
) => (ma: Kind<'Tree', A>) => Kind<'Tree', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -371,3 +373,3 @@ * @category do notation | ||
fb: Tree<B> | ||
) => (fa: Tree<A>) => Tree<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }> | ||
) => (fa: Kind<'Tree', A>) => Kind<'Tree', { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> | ||
/** | ||
@@ -374,0 +376,0 @@ * @since 2.0.0 |
@@ -26,3 +26,14 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tree = exports.chain = exports.exists = exports.elem = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.Comonad = exports.Traversable = exports.Foldable = exports.chainFirst = exports.Monad = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.Functor = exports.URI = exports.of = exports.sequence = exports.traverse = exports.extract = exports.reduceRight = exports.foldMap = exports.reduce = exports.map = exports.flatten = exports.duplicate = exports.extend = exports.flatMap = exports.ap = exports.fold = exports.unfoldForestM = exports.unfoldTreeM = exports.unfoldForest = exports.unfoldTree = exports.drawTree = exports.drawForest = exports.getEq = exports.getShow = exports.make = void 0; | ||
exports.tree = exports.chain = exports.exists = exports.apS = exports.bind = exports.let = exports.bindTo = exports.Do = exports.Comonad = exports.Traversable = exports.Foldable = exports.chainFirst = exports.Monad = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.Functor = exports.URI = exports.of = exports.sequence = exports.traverse = exports.extract = exports.reduceRight = exports.foldMap = exports.reduce = exports.map = exports.flatten = exports.duplicate = exports.extend = exports.flatMap = exports.ap = void 0; | ||
exports.make = make; | ||
exports.getShow = getShow; | ||
exports.getEq = getEq; | ||
exports.drawForest = drawForest; | ||
exports.drawTree = drawTree; | ||
exports.unfoldTree = unfoldTree; | ||
exports.unfoldForest = unfoldForest; | ||
exports.unfoldTreeM = unfoldTreeM; | ||
exports.unfoldForestM = unfoldForestM; | ||
exports.fold = fold; | ||
exports.elem = elem; | ||
var Apply_1 = require("./Apply"); | ||
@@ -46,3 +57,2 @@ var A = __importStar(require("./Array")); | ||
} | ||
exports.make = make; | ||
/** | ||
@@ -62,3 +72,2 @@ * @category instances | ||
} | ||
exports.getShow = getShow; | ||
/** | ||
@@ -75,3 +84,2 @@ * @category instances | ||
} | ||
exports.getEq = getEq; | ||
var draw = function (indentation, forest) { | ||
@@ -97,3 +105,2 @@ var r = ''; | ||
} | ||
exports.drawForest = drawForest; | ||
/** | ||
@@ -124,3 +131,2 @@ * Neat 2-dimensional drawing of a tree | ||
} | ||
exports.drawTree = drawTree; | ||
/** | ||
@@ -136,3 +142,2 @@ * Build a (possibly infinite) tree from a seed value in breadth-first order. | ||
} | ||
exports.unfoldTree = unfoldTree; | ||
/** | ||
@@ -147,3 +152,2 @@ * Build a (possibly infinite) forest from a list of seed values in breadth-first order. | ||
} | ||
exports.unfoldForest = unfoldForest; | ||
function unfoldTreeM(M) { | ||
@@ -156,3 +160,2 @@ var unfoldForestMM = unfoldForestM(M); | ||
} | ||
exports.unfoldTreeM = unfoldTreeM; | ||
function unfoldForestM(M) { | ||
@@ -164,3 +167,2 @@ var traverseM = A.traverse(M); | ||
} | ||
exports.unfoldForestM = unfoldForestM; | ||
/** | ||
@@ -198,3 +200,2 @@ * Fold a tree into a "summary" value in depth-first order. | ||
} | ||
exports.fold = fold; | ||
/* istanbul ignore next */ | ||
@@ -491,3 +492,2 @@ var _map = function (fa, f) { return (0, function_1.pipe)(fa, (0, exports.map)(f)); }; | ||
} | ||
exports.elem = elem; | ||
/** | ||
@@ -494,0 +494,0 @@ * @since 2.11.0 |
@@ -145,3 +145,5 @@ /** | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: [(a: A) => B, E]) => [B, E] | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Tuple', E, (a: A) => B>) => import('./HKT').Kind2<'Tuple', E, B> | ||
/** | ||
@@ -148,0 +150,0 @@ * @category instances |
@@ -26,3 +26,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tuple = exports.mapLeft = exports.map = exports.Traversable = exports.Foldable = exports.Comonad = exports.Semigroupoid = exports.Bifunctor = exports.flap = exports.Functor = exports.URI = exports.sequence = exports.traverse = exports.reduceRight = exports.reduce = exports.foldMap = exports.extract = exports.duplicate = exports.extend = exports.compose = exports.mapSnd = exports.mapFst = exports.bimap = exports.getChainRec = exports.getMonad = exports.getChain = exports.getApplicative = exports.getApply = exports.swap = exports.snd = exports.fst = void 0; | ||
exports.tuple = exports.mapLeft = exports.map = exports.Traversable = exports.Foldable = exports.Comonad = exports.Semigroupoid = exports.Bifunctor = exports.flap = exports.Functor = exports.URI = exports.sequence = exports.traverse = exports.reduceRight = exports.reduce = exports.foldMap = exports.extract = exports.duplicate = exports.extend = exports.compose = exports.mapSnd = exports.mapFst = exports.bimap = exports.swap = exports.snd = exports.fst = void 0; | ||
exports.getApply = getApply; | ||
exports.getApplicative = getApplicative; | ||
exports.getChain = getChain; | ||
exports.getMonad = getMonad; | ||
exports.getChainRec = getChainRec; | ||
var function_1 = require("./function"); | ||
@@ -59,3 +64,2 @@ var Functor_1 = require("./Functor"); | ||
} | ||
exports.getApply = getApply; | ||
var of = function (M) { | ||
@@ -80,3 +84,2 @@ return function (a) { | ||
} | ||
exports.getApplicative = getApplicative; | ||
/** | ||
@@ -99,3 +102,2 @@ * @category instances | ||
} | ||
exports.getChain = getChain; | ||
/** | ||
@@ -116,3 +118,2 @@ * @category instances | ||
} | ||
exports.getMonad = getMonad; | ||
/** | ||
@@ -144,3 +145,2 @@ * @category instances | ||
} | ||
exports.getChainRec = getChainRec; | ||
/* istanbul ignore next */ | ||
@@ -147,0 +147,0 @@ var _compose = function (bc, ab) { return (0, function_1.pipe)(bc, (0, exports.compose)(ab)); }; |
@@ -26,3 +26,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getValidationM = void 0; | ||
exports.getValidationM = getValidationM; | ||
/** | ||
@@ -49,2 +49,1 @@ * @since 2.0.0 | ||
} | ||
exports.getValidationM = getValidationM; |
@@ -26,3 +26,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.filterE = exports.witherDefault = exports.wiltDefault = void 0; | ||
exports.wiltDefault = wiltDefault; | ||
exports.witherDefault = witherDefault; | ||
exports.filterE = filterE; | ||
var _ = __importStar(require("./internal")); | ||
@@ -35,3 +37,2 @@ function wiltDefault(T, C) { | ||
} | ||
exports.wiltDefault = wiltDefault; | ||
function witherDefault(T, C) { | ||
@@ -43,3 +44,2 @@ return function (F) { | ||
} | ||
exports.witherDefault = witherDefault; | ||
function filterE(W) { | ||
@@ -51,2 +51,1 @@ return function (F) { | ||
} | ||
exports.filterE = filterE; |
@@ -77,3 +77,3 @@ /** | ||
*/ | ||
export declare const getPointed: <W>(M: Monoid<W>) => Pointed2C<'Writer', W> | ||
export declare const getPointed: <W>(M: Monoid<W>) => Pointed2C<URI, W> | ||
/** | ||
@@ -83,3 +83,3 @@ * @category instances | ||
*/ | ||
export declare const getApply: <W>(S: Semigroup<W>) => Apply2C<'Writer', W> | ||
export declare const getApply: <W>(S: Semigroup<W>) => Apply2C<URI, W> | ||
/** | ||
@@ -89,3 +89,3 @@ * @category instances | ||
*/ | ||
export declare const getApplicative: <W>(M: Monoid<W>) => Applicative2C<'Writer', W> | ||
export declare const getApplicative: <W>(M: Monoid<W>) => Applicative2C<URI, W> | ||
/** | ||
@@ -110,3 +110,5 @@ * @category instances | ||
*/ | ||
export declare const flap: <A>(a: A) => <E, B>(fab: Writer<E, (a: A) => B>) => Writer<E, B> | ||
export declare const flap: <A>( | ||
a: A | ||
) => <E, B>(fab: import('./HKT').Kind2<'Writer', E, (a: A) => B>) => import('./HKT').Kind2<'Writer', E, B> | ||
/** | ||
@@ -113,0 +115,0 @@ * @since 2.8.0 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.writer = exports.execWriter = exports.evalWriter = exports.execute = exports.evaluate = exports.flap = exports.Functor = exports.getMonad = exports.getChain = exports.getApplicative = exports.getApply = exports.getPointed = exports.URI = exports.map = exports.censor = exports.listens = exports.pass = exports.listen = exports.tell = void 0; | ||
exports.writer = exports.execWriter = exports.evalWriter = exports.execute = exports.evaluate = exports.flap = exports.Functor = exports.getApplicative = exports.getApply = exports.getPointed = exports.URI = exports.map = exports.censor = exports.listens = exports.pass = exports.listen = exports.tell = void 0; | ||
exports.getChain = getChain; | ||
exports.getMonad = getMonad; | ||
var function_1 = require("./function"); | ||
@@ -138,3 +140,2 @@ var Functor_1 = require("./Functor"); | ||
} | ||
exports.getChain = getChain; | ||
/** | ||
@@ -156,3 +157,2 @@ * @category instances | ||
} | ||
exports.getMonad = getMonad; | ||
/** | ||
@@ -159,0 +159,0 @@ * @category instances |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getWriterM = void 0; | ||
exports.getWriterM = getWriterM; | ||
function getWriterM(M) { | ||
@@ -63,2 +63,1 @@ var map = function (fa, f) { | ||
} | ||
exports.getWriterM = getWriterM; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.guard = void 0; | ||
exports.guard = guard; | ||
function guard(F, P) { | ||
return function (b) { return (b ? P.of(undefined) : F.zero()); }; | ||
} | ||
exports.guard = guard; |
{ | ||
"name": "fp-ts", | ||
"version": "2.16.6", | ||
"version": "2.16.7", | ||
"description": "Functional programming in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -20,2 +20,12 @@ <h3 align="center"> | ||
**📢 Important Announcement: fp-ts is Joining the Effect-TS Ecosystem!** | ||
We are excited to announce that the `fp-ts` project is officially merging with the Effect-TS ecosystem. This is a significant step forward in the functional programming landscape, bringing together two powerful libraries under one roof. Giulio Canti, the author of `fp-ts`, is being welcomed into the Effect organization, promising an exciting future with enhanced capabilities and support. | ||
**What This Means for New Users:** | ||
Effect-TS can be regarded as the successor to `fp-ts v2` and embodies what would be considered `fp-ts v3`. This merger marks a significant evolution in the library's capabilities, integrating more features and functionalities tailored towards robust, type-safe, and scalable functional programming. | ||
For more details on this merger and what it entails, please refer to the official [announcement here](https://dev.to/effect/a-bright-future-for-effect-455m). Additionally, you can explore more about Effect-TS and its offerings on our [website and documentation](https://effect.website/). | ||
# Introduction | ||
@@ -22,0 +32,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4735029
155086
111