Socket
Socket
Sign inDemoInstall

@fp-ts/core

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fp-ts/core - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

32

HKT.d.ts

@@ -12,3 +12,3 @@ /**

export interface TypeClass<F extends TypeLambda> {
readonly [URI]?: F;
[URI]?: F;
}

@@ -19,6 +19,6 @@ /**

export interface TypeLambda {
readonly In: unknown;
readonly Out2: unknown;
readonly Out1: unknown;
readonly Target: unknown;
In: unknown;
Out2: unknown;
Out1: unknown;
Target: unknown;
}

@@ -28,16 +28,16 @@ /**

*/
export declare type Kind<F extends TypeLambda, In, Out2, Out1, Target> = F extends {
readonly type: unknown;
export type Kind<F extends TypeLambda, In, Out2, Out1, Target> = F extends {
type: unknown;
} ? (F & {
readonly In: In;
readonly Out2: Out2;
readonly Out1: Out1;
readonly Target: Target;
In: In;
Out2: Out2;
Out1: Out1;
Target: Target;
})["type"] : {
readonly F: F;
readonly In: (_: In) => void;
readonly Out2: () => Out2;
readonly Out1: () => Out1;
readonly Target: (_: Target) => Target;
F: F;
In: (_: In) => void;
Out2: () => Out2;
Out1: () => Out1;
Target: (_: Target) => Target;
};
//# sourceMappingURL=HKT.d.ts.map

@@ -7,106 +7,54 @@ "use strict";

exports.traversable = exports.semigroup = exports.semiProduct = exports.semiCoproduct = exports.semiApplicative = exports.semiAlternative = exports.product = exports.pointed = exports.order = exports.of = exports.nonEmptyTraversable = exports.monoid = exports.monad = exports.invariant = exports.hkt = exports.foldable = exports.flatMap = exports.covariant = exports.coproduct = exports.contravariant = exports.chainable = exports.bounded = exports.bicovariant = exports.applicative = exports.alternative = void 0;
var hkt = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/HKT"));
exports.hkt = hkt;
var alternative = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Alternative"));
exports.alternative = alternative;
var applicative = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Applicative"));
exports.applicative = applicative;
var bicovariant = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Bicovariant"));
exports.bicovariant = bicovariant;
var bounded = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Bounded"));
exports.bounded = bounded;
var chainable = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Chainable"));
exports.chainable = chainable;
var contravariant = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Contravariant"));
exports.contravariant = contravariant;
var coproduct = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Coproduct"));
exports.coproduct = coproduct;
var covariant = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Covariant"));
exports.covariant = covariant;
var flatMap = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/FlatMap"));
exports.flatMap = flatMap;
var foldable = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Foldable"));
exports.foldable = foldable;
var invariant = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Invariant"));
exports.invariant = invariant;
var monad = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Monad"));
exports.monad = monad;
var monoid = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Monoid"));
exports.monoid = monoid;
var nonEmptyTraversable = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/NonEmptyTraversable"));
exports.nonEmptyTraversable = nonEmptyTraversable;
var of = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Of"));
exports.of = of;
var order = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Order"));
exports.order = order;
var pointed = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Pointed"));
exports.pointed = pointed;
var product = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Product"));
exports.product = product;
var semiAlternative = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/SemiAlternative"));
exports.semiAlternative = semiAlternative;
var semiApplicative = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/SemiApplicative"));
exports.semiApplicative = semiApplicative;
var semiCoproduct = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/SemiCoproduct"));
exports.semiCoproduct = semiCoproduct;
var semigroup = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Semigroup"));
exports.semigroup = semigroup;
var semiProduct = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/SemiProduct"));
exports.semiProduct = semiProduct;
var traversable = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Traversable"));
exports.traversable = traversable;
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
//# sourceMappingURL=index.js.map

@@ -8,19 +8,13 @@ "use strict";

exports.pipe = pipe;
/** @internal */
/** @internal */
const identity = a => a;
exports.identity = identity;
function pipe() {
let out = arguments[0];
for (let i = 1; i < arguments.length; i++) {
out = arguments[i](out);
}
return out;
}
//# sourceMappingURL=Function.js.map
{
"name": "@fp-ts/core",
"version": "0.0.9",
"version": "0.0.10",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

@@ -14,3 +14,3 @@ /**

export interface TypeClass<F extends TypeLambda> {
readonly [URI]?: F
[URI]?: F
}

@@ -22,6 +22,6 @@

export interface TypeLambda {
readonly In: unknown
readonly Out2: unknown
readonly Out1: unknown
readonly Target: unknown
In: unknown
Out2: unknown
Out1: unknown
Target: unknown
}

@@ -33,15 +33,15 @@

export type Kind<F extends TypeLambda, In, Out2, Out1, Target> = F extends {
readonly type: unknown
type: unknown
} ? (F & {
readonly In: In
readonly Out2: Out2
readonly Out1: Out1
readonly Target: Target
In: In
Out2: Out2
Out1: Out1
Target: Target
})["type"]
: {
readonly F: F
readonly In: (_: In) => void
readonly Out2: () => Out2
readonly Out1: () => Out1
readonly Target: (_: Target) => Target
F: F
In: (_: In) => void
Out2: () => Out2
Out1: () => Out1
Target: (_: Target) => Target
}

@@ -13,3 +13,3 @@ /**

export interface Bicovariant<F extends TypeLambda> extends TypeClass<F> {
readonly bimap: <E1, E2, A, B>(
bimap: <E1, E2, A, B>(
f: (e: E1) => E2,

@@ -16,0 +16,0 @@ g: (a: A) => B

@@ -13,4 +13,4 @@ /**

export interface Bounded<A> extends Order<A> {
readonly maxBound: A
readonly minBound: A
maxBound: A
minBound: A
}

@@ -23,3 +23,3 @@

export interface BoundedTypeLambda extends TypeLambda {
readonly type: Bounded<this["Target"]>
type: Bounded<this["Target"]>
}

@@ -26,0 +26,0 @@

@@ -59,3 +59,3 @@ /**

E1 | E2,
{ readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }
{ [K in keyof A | N]: K extends keyof A ? A[K] : B }
> =>

@@ -62,0 +62,0 @@ F.flatMap(a =>

@@ -12,3 +12,3 @@ /**

export interface Contravariant<F extends TypeLambda> extends Invariant<F> {
readonly contramap: <B, A>(
contramap: <B, A>(
f: (b: B) => A

@@ -15,0 +15,0 @@ ) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, B>

@@ -14,5 +14,5 @@ /**

export interface Coproduct<F extends TypeLambda> extends SemiCoproduct<F> {
readonly zero: <A>() => Kind<F, unknown, never, never, A>
zero: <A>() => Kind<F, unknown, never, never, A>
readonly coproductAll: <R, O, E, A>(
coproductAll: <R, O, E, A>(
collection: Iterable<Kind<F, R, O, E, A>>

@@ -19,0 +19,0 @@ ) => Kind<F, R, O, E, A>

@@ -12,3 +12,3 @@ /**

export interface Covariant<F extends TypeLambda> extends Invariant<F> {
readonly map: <A, B>(
map: <A, B>(
f: (a: A) => B

@@ -79,3 +79,3 @@ ) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, B>

self: Kind<F, R, O, E, A>
) => Kind<F, R, O, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }>) =>
) => Kind<F, R, O, E, { [K in keyof A | N]: K extends keyof A ? A[K] : B }>) =>
(name, f) => F.map(a => Object.assign({}, a, { [name]: f(a) }) as any)

@@ -82,0 +82,0 @@

@@ -12,3 +12,3 @@ /**

export interface FlatMap<F extends TypeLambda> extends TypeClass<F> {
readonly flatMap: <A, R2, O2, E2, B>(
flatMap: <A, R2, O2, E2, B>(
f: (a: A) => Kind<F, R2, O2, E2, B>

@@ -15,0 +15,0 @@ ) => <R1, O1, E1>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O1 | O2, E1 | E2, B>

@@ -16,3 +16,3 @@ /**

export interface Foldable<F extends TypeLambda> extends TypeClass<F> {
readonly reduce: <A, B>(
reduce: <A, B>(
b: B,

@@ -46,3 +46,3 @@ f: (b: B, a: A) => B

f: (b: B, a: A) => B
) => <R, O, E>(self: Kind<F, R, O, E, A>): B => toReadonlyArray(F)(self).reduceRight(f, b)
) => <R, O, E>(self: Kind<F, R, O, E, A>): B => toArray(F)(self).reduceRight(f, b)

@@ -55,3 +55,3 @@ /**

<A>(f: (a: A) => M) =>
<R, O, E>(self: Kind<F, R, O, E, A>): M => M.combineAll(toReadonlyArrayWith(F)(f)(self))
<R, O, E>(self: Kind<F, R, O, E, A>): M => M.combineAll(toArrayWith(F)(f)(self))

@@ -61,7 +61,7 @@ /**

*/
export const toReadonlyArrayWith = <F extends TypeLambda>(
export const toArrayWith = <F extends TypeLambda>(
F: Foldable<F>
) =>
<A, B>(f: (a: A) => B) =>
<R, O, E>(self: Kind<F, R, O, E, A>): ReadonlyArray<B> =>
<R, O, E>(self: Kind<F, R, O, E, A>): Array<B> =>
F.reduce<A, Array<B>>([], (out, a) => {

@@ -75,5 +75,5 @@ out.push(f(a))

*/
export const toReadonlyArray = <F extends TypeLambda>(
export const toArray = <F extends TypeLambda>(
F: Foldable<F>
): <R, O, E, A>(self: Kind<F, R, O, E, A>) => ReadonlyArray<A> => toReadonlyArrayWith(F)(identity)
): <R, O, E, A>(self: Kind<F, R, O, E, A>) => Array<A> => toArrayWith(F)(identity)

@@ -80,0 +80,0 @@ /**

@@ -11,3 +11,3 @@ /**

export interface Invariant<F extends TypeLambda> extends TypeClass<F> {
readonly imap: <A, B>(
imap: <A, B>(
to: (a: A) => B,

@@ -42,3 +42,3 @@ from: (b: B) => A

self: Kind<F, R, O, E, A>
) => Kind<F, R, O, E, { readonly [K in N]: A }>) =>
) => Kind<F, R, O, E, { [K in N]: A }>) =>
F.imap(a => ({ [name]: a } as any), ({ [name]: a }) => a)

@@ -51,3 +51,3 @@

F: Invariant<F>
): (<R, O, E, A>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, readonly [A]>) =>
F.imap(a => [a] as const, ([a]) => a)
): (<R, O, E, A>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, [A]>) =>
F.imap(a => [a], ([a]) => a)

@@ -13,4 +13,4 @@ /**

export interface Monoid<A> extends Semigroup<A> {
readonly empty: A
readonly combineAll: (collection: Iterable<A>) => A
empty: A
combineAll: (collection: Iterable<A>) => A
}

@@ -64,3 +64,3 @@

monoids: { [K in keyof A]: Monoid<A[K]> }
): Monoid<{ readonly [K in keyof A]: A[K] }> => {
): Monoid<{ [K in keyof A]: A[K] }> => {
const empty: A = {} as any

@@ -80,7 +80,7 @@ for (const k in monoids) {

*/
export const tuple = <A extends ReadonlyArray<any>>(
export const tuple = <A extends Array<any>>(
...monoids: { [K in keyof A]: Monoid<A[K]> }
): Monoid<Readonly<A>> => {
): Monoid<A> => {
const empty: A = monoids.map((m) => m.empty) as any
return fromSemigroup(semigroup.tuple(...monoids), empty)
return fromSemigroup(semigroup.tuple<A>(...monoids), empty)
}

@@ -16,3 +16,3 @@ /**

export interface NonEmptyTraversable<T extends TypeLambda> extends TypeClass<T> {
readonly traverseNonEmpty: <F extends TypeLambda>(
traverseNonEmpty: <F extends TypeLambda>(
F: SemiApplicative<F>

@@ -25,3 +25,3 @@ ) => <A, R, O, E, B>(

readonly sequenceNonEmpty: <F extends TypeLambda>(
sequenceNonEmpty: <F extends TypeLambda>(
F: SemiApplicative<F>

@@ -28,0 +28,0 @@ ) => <TR, TO, TE, R, O, E, A>(

@@ -11,3 +11,3 @@ /**

export interface Of<F extends TypeLambda> extends TypeClass<F> {
readonly of: <A>(a: A) => Kind<F, unknown, never, never, A>
of: <A>(a: A) => Kind<F, unknown, never, never, A>
}

@@ -14,0 +14,0 @@

@@ -18,3 +18,3 @@ /**

export interface Order<A> {
readonly compare: (that: A) => (self: A) => -1 | 0 | 1
compare: (that: A) => (self: A) => -1 | 0 | 1
}

@@ -27,3 +27,3 @@

export interface OrderTypeLambda extends TypeLambda {
readonly type: Order<this["Target"]>
type: Order<this["Target"]>
}

@@ -46,3 +46,3 @@

*/
export const tuple = <A extends ReadonlyArray<any>>(
export const tuple = <A extends Array<any>>(
...orders: { [K in keyof A]: Order<A[K]> }

@@ -49,0 +49,0 @@ ): Order<Readonly<A>> =>

@@ -14,5 +14,5 @@ /**

export interface Product<F extends TypeLambda> extends SemiProduct<F>, Of<F> {
readonly productAll: <R, O, E, A>(
productAll: <R, O, E, A>(
collection: Iterable<Kind<F, R, O, E, A>>
) => Kind<F, R, O, E, ReadonlyArray<A>>
) => Kind<F, R, O, E, Array<A>>
}

@@ -24,3 +24,3 @@

export const tuple = <F extends TypeLambda>(F: Product<F>) =>
<T extends ReadonlyArray<Kind<F, any, any, any, any>>>(...components: T): Kind<
<T extends Array<Kind<F, any, any, any, any>>>(...components: T): Kind<
F,

@@ -30,3 +30,3 @@ ([T[number]] extends [Kind<F, infer R, any, any, any>] ? R : never),

([T[number]] extends [Kind<F, any, any, infer E, any>] ? E : never),
Readonly<{ [I in keyof T]: [T[I]] extends [Kind<F, any, any, any, infer A>] ? A : never }>
{ [I in keyof T]: [T[I]] extends [Kind<F, any, any, any, infer A>] ? A : never }
> => F.productAll(components) as any

@@ -43,3 +43,3 @@

([R[keyof R]] extends [Kind<F, any, any, infer E, any>] ? E : never),
{ readonly [K in keyof R]: [R[K]] extends [Kind<F, any, any, any, infer A>] ? A : never }
{ [K in keyof R]: [R[K]] extends [Kind<F, any, any, any, infer A>] ? A : never }
> => {

@@ -46,0 +46,0 @@ const keys = Object.keys(fields)

@@ -13,3 +13,3 @@ /**

export interface SemiCoproduct<F extends TypeLambda> extends Invariant<F> {
readonly coproduct: <R2, O2, E2, B>(
coproduct: <R2, O2, E2, B>(
that: Kind<F, R2, O2, E2, B>

@@ -20,3 +20,3 @@ ) => <R1, O1, E1, A>(

readonly coproductMany: <R, O, E, A>(
coproductMany: <R, O, E, A>(
collection: Iterable<Kind<F, R, O, E, A>>

@@ -23,0 +23,0 @@ ) => (self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, A>

@@ -6,4 +6,4 @@ /**

* export interface Semigroup<A> {
* readonly combine: (that: A) => (self: A) => A
* readonly combineMany: (collection: Iterable<A>) => (self: A) => A
* combine: (that: A) => (self: A) => A
* combineMany: (collection: Iterable<A>) => (self: A) => A
* }

@@ -36,4 +36,4 @@ * ```

export interface Semigroup<A> {
readonly combine: (that: A) => (self: A) => A
readonly combineMany: (collection: Iterable<A>) => (self: A) => A
combine: (that: A) => (self: A) => A
combineMany: (collection: Iterable<A>) => (self: A) => A
}

@@ -46,3 +46,3 @@

export interface SemigroupTypeLambda extends TypeLambda {
readonly type: Semigroup<this["Target"]>
type: Semigroup<this["Target"]>
}

@@ -118,3 +118,3 @@

{
readonly [K in keyof A]: A[K]
[K in keyof A]: A[K]
}

@@ -139,5 +139,5 @@ > =>

*/
export const tuple = <A extends ReadonlyArray<any>>(
export const tuple = <A extends Array<any>>(
...semigroups: { [K in keyof A]: Semigroup<A[K]> }
): Semigroup<Readonly<A>> =>
): Semigroup<A> =>
fromCombine((that) => (self) => semigroups.map((S, i) => S.combine(that[i])(self[i])) as any)

@@ -144,0 +144,0 @@

@@ -15,11 +15,11 @@ /**

export interface SemiProduct<F extends TypeLambda> extends Invariant<F> {
readonly product: <R2, O2, E2, B>(
product: <R2, O2, E2, B>(
that: Kind<F, R2, O2, E2, B>
) => <R1, O1, E1, A>(
self: Kind<F, R1, O1, E1, A>
) => Kind<F, R1 & R2, O1 | O2, E1 | E2, readonly [A, B]>
) => Kind<F, R1 & R2, O1 | O2, E1 | E2, [A, B]>
readonly productMany: <R, O, E, A>(
productMany: <R, O, E, A>(
collection: Iterable<Kind<F, R, O, E, A>>
) => (self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, readonly [A, ...ReadonlyArray<A>]>
) => (self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, [A, ...Array<A>]>
}

@@ -46,3 +46,3 @@

FE1 | FE2,
Kind<G, GR1 & GR2, GO1 | GO2, GE1 | GE2, readonly [A, B]>
Kind<G, GR1 & GR2, GO1 | GO2, GE1 | GE2, [A, B]>
> => pipe(self, F.product(that), F.map(([ga, gb]) => pipe(ga, G.product(gb))))

@@ -64,3 +64,3 @@

self: Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, A>>
): Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, readonly [A, ...ReadonlyArray<A>]>> =>
): Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, [A, ...Array<A>]>> =>
pipe(

@@ -88,3 +88,3 @@ self,

self,
Covariant.map((a): readonly [A, ...Array<A>] => [a])
Covariant.map((a): [A, ...Array<A>] => [a])
)

@@ -95,3 +95,3 @@ for (const fa of collection) {

product(fa),
Covariant.map(([[head, ...tail], a]): readonly [A, ...Array<A>] => [head, ...tail, a])
Covariant.map(([[head, ...tail], a]): [A, ...Array<A>] => [head, ...tail, a])
)

@@ -117,3 +117,3 @@ }

E1 | E2,
{ readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }
{ [K in keyof A | N]: K extends keyof A ? A[K] : B }
> =>

@@ -136,9 +136,9 @@ pipe(

) =>
<R1, O1, E1, A extends ReadonlyArray<any>>(
<R1, O1, E1, A extends Array<any>>(
self: Kind<F, R1, O1, E1, A>
): Kind<F, R1 & R2, O1 | O2, E1 | E2, readonly [...A, B]> =>
): Kind<F, R1 & R2, O1 | O2, E1 | E2, [...A, B]> =>
pipe(
self,
F.product(that),
F.imap(([a, b]) => [...a, b] as const, ab => [ab.slice(0, -1), ab[ab.length - 1]] as any)
F.imap(([a, b]) => [...a, b], ab => [ab.slice(0, -1), ab[ab.length - 1]] as any)
)

@@ -150,3 +150,3 @@

export const nonEmptyTuple = <F extends TypeLambda>(F: SemiProduct<F>) =>
<T extends [Kind<F, any, any, any, any>, ...ReadonlyArray<Kind<F, any, any, any, any>>]>(
<T extends [Kind<F, any, any, any, any>, ...Array<Kind<F, any, any, any, any>>]>(
...components: T

@@ -158,3 +158,3 @@ ): Kind<

([T[number]] extends [Kind<F, any, any, infer E, any>] ? E : never),
Readonly<{ [I in keyof T]: [T[I]] extends [Kind<F, any, any, any, infer A>] ? A : never }>
{ [I in keyof T]: [T[I]] extends [Kind<F, any, any, any, infer A>] ? A : never }
> => F.productMany(components.slice(1))(components[0]) as any

@@ -175,3 +175,3 @@

([R[keyof R]] extends [Kind<F, any, any, infer E, any>] ? E : never),
{ readonly [K in keyof R]: [R[K]] extends [Kind<F, any, any, any, infer A>] ? A : never }
{ [K in keyof R]: [R[K]] extends [Kind<F, any, any, any, infer A>] ? A : never }
> => {

@@ -178,0 +178,0 @@ const keys = Object.keys(fields)

@@ -14,3 +14,3 @@ /**

export interface Traversable<T extends TypeLambda> extends TypeClass<T> {
readonly traverse: <F extends TypeLambda>(
traverse: <F extends TypeLambda>(
F: Applicative<F>

@@ -21,3 +21,3 @@ ) => <A, R, O, E, B>(

readonly sequence: <F extends TypeLambda>(F: Applicative<F>) => <TR, TO, TE, R, O, E, A>(
sequence: <F extends TypeLambda>(F: Applicative<F>) => <TR, TO, TE, R, O, E, A>(
self: Kind<T, TR, TO, TE, Kind<F, R, O, E, A>>

@@ -24,0 +24,0 @@ ) => Kind<F, R, O, E, Kind<T, TR, TO, TE, A>>

@@ -7,11 +7,6 @@ "use strict";

exports.liftMonoid = void 0;
var monoid = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Monoid"));
var semiApplicative = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/SemiApplicative"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**

@@ -23,4 +18,3 @@ * Lift a monoid into 'F', the inner values are combined using the provided `Monoid`.

const liftMonoid = F => M => monoid.fromSemigroup(semiApplicative.liftSemigroup(F)(M), F.of(M.empty));
exports.liftMonoid = liftMonoid;
//# sourceMappingURL=Applicative.js.map

@@ -11,3 +11,3 @@ /**

export interface Bicovariant<F extends TypeLambda> extends TypeClass<F> {
readonly bimap: <E1, E2, A, B>(f: (e: E1) => E2, g: (a: A) => B) => <R, O>(self: Kind<F, R, O, E1, A>) => Kind<F, R, O, E2, B>;
bimap: <E1, E2, A, B>(f: (e: E1) => E2, g: (a: A) => B) => <R, O>(self: Kind<F, R, O, E1, A>) => Kind<F, R, O, E2, B>;
}

@@ -14,0 +14,0 @@ /**

@@ -7,5 +7,3 @@ "use strict";

exports.mapLeft = exports.map = exports.bimapComposition = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -20,6 +18,3 @@ * Returns a default `bimap` composition.

*/
exports.bimapComposition = bimapComposition;
const mapLeft = F => f => F.bimap(f, _Function.identity);

@@ -31,9 +26,5 @@ /**

*/
exports.mapLeft = mapLeft;
const map = F => f => F.bimap(_Function.identity, f);
exports.map = map;
//# sourceMappingURL=Bicovariant.js.map

@@ -11,4 +11,4 @@ /**

export interface Bounded<A> extends Order<A> {
readonly maxBound: A;
readonly minBound: A;
maxBound: A;
minBound: A;
}

@@ -20,3 +20,3 @@ /**

export interface BoundedTypeLambda extends TypeLambda {
readonly type: Bounded<this["Target"]>;
type: Bounded<this["Target"]>;
}

@@ -23,0 +23,0 @@ /**

@@ -7,9 +7,5 @@ "use strict";

exports.reverse = exports.clamp = void 0;
var order = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Order"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**

@@ -26,12 +22,9 @@ * Clamp a value between `minBound` and `maxBound` values.

*/
exports.clamp = clamp;
const reverse = B => ({ ...order.reverse(B),
const reverse = B => ({
...order.reverse(B),
minBound: B.minBound,
maxBound: B.maxBound
});
exports.reverse = reverse;
//# sourceMappingURL=Bounded.js.map

@@ -30,3 +30,3 @@ /**

*/
export declare const bind: <F extends TypeLambda>(F: Chainable<F>) => <N extends string, A extends object, R2, O2, E2, B>(name: Exclude<N, keyof A>, f: (a: A) => Kind<F, R2, O2, E2, B>) => <R1, O1, E1>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
export declare const bind: <F extends TypeLambda>(F: Chainable<F>) => <N extends string, A extends object, R2, O2, E2, B>(name: Exclude<N, keyof A>, f: (a: A) => Kind<F, R2, O2, E2, B>) => <R1, O1, E1>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, { [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
//# sourceMappingURL=Chainable.d.ts.map

@@ -7,5 +7,3 @@ "use strict";

exports.tap = exports.bind = exports.andThenDiscard = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -24,6 +22,3 @@ * Returns an effect that effectfully "peeks" at the success of this effect.

*/
exports.tap = tap;
const andThenDiscard = F => that => tap(F)(() => that);

@@ -33,11 +28,7 @@ /**

*/
exports.andThenDiscard = andThenDiscard;
const bind = F => (name, f) => F.flatMap(a => (0, _Function.pipe)(f(a), F.map(b => Object.assign({}, a, {
[name]: b
}))));
exports.bind = bind;
//# sourceMappingURL=Chainable.js.map

@@ -11,3 +11,3 @@ /**

export interface Contravariant<F extends TypeLambda> extends Invariant<F> {
readonly contramap: <B, A>(f: (b: B) => A) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, B>;
contramap: <B, A>(f: (b: B) => A) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, B>;
}

@@ -14,0 +14,0 @@ /**

@@ -7,3 +7,2 @@ "use strict";

exports.make = exports.imap = exports.contramapComposition = void 0;
/**

@@ -22,6 +21,3 @@ * Composing two contravariant functors yields a Covariant functor.

*/
exports.contramapComposition = contramapComposition;
const imap = contramap => (_, from) => contramap(from);

@@ -32,6 +28,3 @@ /**

*/
exports.imap = imap;
const make = contramap => ({

@@ -41,4 +34,3 @@ contramap,

});
exports.make = make;
//# sourceMappingURL=Contravariant.js.map

@@ -12,4 +12,4 @@ /**

export interface Coproduct<F extends TypeLambda> extends SemiCoproduct<F> {
readonly zero: <A>() => Kind<F, unknown, never, never, A>;
readonly coproductAll: <R, O, E, A>(collection: Iterable<Kind<F, R, O, E, A>>) => Kind<F, R, O, E, A>;
zero: <A>() => Kind<F, unknown, never, never, A>;
coproductAll: <R, O, E, A>(collection: Iterable<Kind<F, R, O, E, A>>) => Kind<F, R, O, E, A>;
}

@@ -16,0 +16,0 @@ /**

@@ -7,18 +7,14 @@ "use strict";

exports.getMonoid = void 0;
var semiCoproduct = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/SemiCoproduct"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
* @since 1.0.0
*/
const getMonoid = F => () => ({ ...semiCoproduct.getSemigroup(F)(),
const getMonoid = F => () => ({
...semiCoproduct.getSemigroup(F)(),
empty: F.zero(),
combineAll: F.coproductAll
});
exports.getMonoid = getMonoid;
//# sourceMappingURL=Coproduct.js.map

@@ -11,3 +11,3 @@ /**

export interface Covariant<F extends TypeLambda> extends Invariant<F> {
readonly map: <A, B>(f: (a: A) => B) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, B>;
map: <A, B>(f: (a: A) => B) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, B>;
}

@@ -46,3 +46,3 @@ /**

export declare const asUnit: <F extends TypeLambda>(F: Covariant<F>) => <R, O, E, _>(self: Kind<F, R, O, E, _>) => Kind<F, R, O, E, void>;
declare const let_: <F extends TypeLambda>(F: Covariant<F>) => <N extends string, A extends object, B>(name: Exclude<N, keyof A>, f: (a: A) => B) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
declare const let_: <F extends TypeLambda>(F: Covariant<F>) => <N extends string, A extends object, B>(name: Exclude<N, keyof A>, f: (a: A) => B) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, { [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
export {

@@ -49,0 +49,0 @@ /**

@@ -7,3 +7,2 @@ "use strict";

exports.mapComposition = exports.make = exports.let = exports.imap = exports.flap = exports.asUnit = exports.as = void 0;
/**

@@ -20,6 +19,3 @@ * Returns a default `map` composition.

*/
exports.mapComposition = mapComposition;
const imap = map => (to, _) => map(to);

@@ -30,6 +26,3 @@ /**

*/
exports.imap = imap;
const make = map => ({

@@ -43,6 +36,3 @@ map,

*/
exports.make = make;
const flap = F => a => F.map(f => f(a));

@@ -53,6 +43,3 @@ /**

*/
exports.flap = flap;
const as = F => b => F.map(() => b);

@@ -63,15 +50,9 @@ /**

*/
exports.as = as;
const asUnit = F => as(F)(undefined);
exports.asUnit = asUnit;
const let_ = F => (name, f) => F.map(a => Object.assign({}, a, {
[name]: f(a)
}));
exports.let = let_;
//# sourceMappingURL=Covariant.js.map

@@ -10,3 +10,3 @@ /**

export interface FlatMap<F extends TypeLambda> extends TypeClass<F> {
readonly flatMap: <A, R2, O2, E2, B>(f: (a: A) => Kind<F, R2, O2, E2, B>) => <R1, O1, E1>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O1 | O2, E1 | E2, B>;
flatMap: <A, R2, O2, E2, B>(f: (a: A) => Kind<F, R2, O2, E2, B>) => <R1, O1, E1>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O1 | O2, E1 | E2, B>;
}

@@ -13,0 +13,0 @@ /**

@@ -7,5 +7,3 @@ "use strict";

exports.flatten = exports.composeKleisliArrow = exports.andThen = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -20,6 +18,3 @@ * @since 1.0.0

*/
exports.flatten = flatten;
const andThen = F => that => F.flatMap(() => that);

@@ -29,9 +24,5 @@ /**

*/
exports.andThen = andThen;
const composeKleisliArrow = F => bc => ab => a => (0, _Function.pipe)(ab(a), F.flatMap(bc));
exports.composeKleisliArrow = composeKleisliArrow;
//# sourceMappingURL=FlatMap.js.map

@@ -13,3 +13,3 @@ /**

export interface Foldable<F extends TypeLambda> extends TypeClass<F> {
readonly reduce: <A, B>(b: B, f: (b: B, a: A) => B) => <R, O, E>(self: Kind<F, R, O, E, A>) => B;
reduce: <A, B>(b: B, f: (b: B, a: A) => B) => <R, O, E>(self: Kind<F, R, O, E, A>) => B;
}

@@ -33,7 +33,7 @@ /**

*/
export declare const toReadonlyArrayWith: <F extends TypeLambda>(F: Foldable<F>) => <A, B>(f: (a: A) => B) => <R, O, E>(self: Kind<F, R, O, E, A>) => readonly B[];
export declare const toArrayWith: <F extends TypeLambda>(F: Foldable<F>) => <A, B>(f: (a: A) => B) => <R, O, E>(self: Kind<F, R, O, E, A>) => B[];
/**
* @since 1.0.0
*/
export declare const toReadonlyArray: <F extends TypeLambda>(F: Foldable<F>) => <R, O, E, A>(self: Kind<F, R, O, E, A>) => readonly A[];
export declare const toArray: <F extends TypeLambda>(F: Foldable<F>) => <R, O, E, A>(self: Kind<F, R, O, E, A>) => A[];
/**

@@ -40,0 +40,0 @@ * @since 1.0.0

@@ -6,6 +6,4 @@ "use strict";

});
exports.toReadonlyArrayWith = exports.toReadonlyArray = exports.reduceRightKind = exports.reduceRight = exports.reduceKind = exports.reduceComposition = exports.foldMapKind = exports.foldMap = void 0;
exports.toArrayWith = exports.toArray = exports.reduceRightKind = exports.reduceRight = exports.reduceKind = exports.reduceComposition = exports.foldMapKind = exports.foldMap = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -24,23 +22,14 @@ * @since 1.0.0

*/
exports.reduceComposition = reduceComposition;
const reduceRight = F => (b, f) => self => toReadonlyArray(F)(self).reduceRight(f, b);
const reduceRight = F => (b, f) => self => toArray(F)(self).reduceRight(f, b);
/**
* @since 1.0.0
*/
exports.reduceRight = reduceRight;
const foldMap = F => M => f => self => M.combineAll(toReadonlyArrayWith(F)(f)(self));
const foldMap = F => M => f => self => M.combineAll(toArrayWith(F)(f)(self));
/**
* @since 1.0.0
*/
exports.foldMap = foldMap;
const toReadonlyArrayWith = F => f => self => F.reduce([], (out, a) => {
const toArrayWith = F => f => self => F.reduce([], (out, a) => {
out.push(f(a));

@@ -52,14 +41,8 @@ return out;

*/
exports.toReadonlyArrayWith = toReadonlyArrayWith;
const toReadonlyArray = F => toReadonlyArrayWith(F)(_Function.identity);
exports.toArrayWith = toArrayWith;
const toArray = F => toArrayWith(F)(_Function.identity);
/**
* @since 1.0.0
*/
exports.toReadonlyArray = toReadonlyArray;
exports.toArray = toArray;
const reduceKind = F => G => (b, f) => F.reduce(G.of(b), (gb, a) => (0, _Function.pipe)(gb, G.flatMap(b => f(b, a))));

@@ -69,6 +52,3 @@ /**

*/
exports.reduceKind = reduceKind;
const reduceRightKind = F => G => (b, f) => reduceRight(F)(G.of(b), (gb, a) => (0, _Function.pipe)(gb, G.flatMap(b => f(b, a))));

@@ -78,9 +58,5 @@ /**

*/
exports.reduceRightKind = reduceRightKind;
const foldMapKind = F => G => f => F.reduce(G.zero(), (gb, a) => (0, _Function.pipe)(gb, G.coproduct(f(a))));
exports.foldMapKind = foldMapKind;
//# sourceMappingURL=Foldable.js.map

@@ -10,3 +10,3 @@ /**

export interface Invariant<F extends TypeLambda> extends TypeClass<F> {
readonly imap: <A, B>(to: (a: A) => B, from: (b: B) => A) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, B>;
imap: <A, B>(to: (a: A) => B, from: (b: B) => A) => <R, O, E>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, B>;
}

@@ -22,7 +22,7 @@ /**

*/
export declare const bindTo: <F extends TypeLambda>(F: Invariant<F>) => <N extends string>(name: N) => <R, O, E, A>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, { readonly [K in N]: A; }>;
export declare const bindTo: <F extends TypeLambda>(F: Invariant<F>) => <N extends string>(name: N) => <R, O, E, A>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, { [K in N]: A; }>;
/**
* @since 1.0.0
*/
export declare const tupled: <F extends TypeLambda>(F: Invariant<F>) => <R, O, E, A>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, readonly [A]>;
export declare const tupled: <F extends TypeLambda>(F: Invariant<F>) => <R, O, E, A>(self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, [A]>;
//# sourceMappingURL=Invariant.d.ts.map

@@ -7,3 +7,2 @@ "use strict";

exports.tupled = exports.imapComposition = exports.bindTo = void 0;
/**

@@ -18,6 +17,3 @@ * Returns a default `imap` composition.

*/
exports.imapComposition = imapComposition;
const bindTo = F => name => F.imap(a => ({

@@ -31,9 +27,5 @@ [name]: a

*/
exports.bindTo = bindTo;
const tupled = F => F.imap(a => [a], ([a]) => a);
exports.tupled = tupled;
//# sourceMappingURL=Invariant.js.map

@@ -11,4 +11,4 @@ /**

export interface Monoid<A> extends Semigroup<A> {
readonly empty: A;
readonly combineAll: (collection: Iterable<A>) => A;
empty: A;
combineAll: (collection: Iterable<A>) => A;
}

@@ -51,3 +51,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<{ [K_1 in keyof A]: A[K_1]; }>;
/**

@@ -58,3 +58,3 @@ * Given a tuple of monoids returns a monoid for the tuple.

*/
export declare const tuple: <A extends readonly any[]>(...monoids: { [K in keyof A]: Monoid<A[K]>; }) => Monoid<Readonly<A>>;
export declare const tuple: <A extends any[]>(...monoids: { [K in keyof A]: Monoid<A[K]>; }) => Monoid<A>;
//# sourceMappingURL=Monoid.d.ts.map

@@ -7,9 +7,5 @@ "use strict";

exports.tuple = exports.struct = exports.reverse = exports.min = exports.max = exports.fromSemigroup = void 0;
var semigroup = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Semigroup"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**

@@ -21,3 +17,4 @@ * Optimised.

*/
const fromSemigroup = (S, empty) => ({ ...S,
const fromSemigroup = (S, empty) => ({
...S,
empty,

@@ -34,6 +31,3 @@ combineAll: collection => S.combineMany(collection)(empty)

*/
exports.fromSemigroup = fromSemigroup;
const min = B => fromSemigroup(semigroup.min(B), B.maxBound);

@@ -48,6 +42,3 @@ /**

*/
exports.min = min;
const max = B => fromSemigroup(semigroup.max(B), B.minBound);

@@ -59,6 +50,3 @@ /**

*/
exports.max = max;
const reverse = M => fromSemigroup(semigroup.reverse(M), M.empty);

@@ -70,9 +58,5 @@ /**

*/
exports.reverse = reverse;
const struct = monoids => {
const empty = {};
for (const k in monoids) {

@@ -83,3 +67,2 @@ if (Object.prototype.hasOwnProperty.call(monoids, k)) {

}
return fromSemigroup(semigroup.struct(monoids), empty);

@@ -92,6 +75,3 @@ };

*/
exports.struct = struct;
const tuple = (...monoids) => {

@@ -101,4 +81,3 @@ const empty = monoids.map(m => m.empty);

};
exports.tuple = tuple;
//# sourceMappingURL=Monoid.js.map

@@ -14,4 +14,4 @@ /**

export interface NonEmptyTraversable<T extends TypeLambda> extends TypeClass<T> {
readonly traverseNonEmpty: <F extends TypeLambda>(F: SemiApplicative<F>) => <A, R, O, E, B>(f: (a: A) => Kind<F, R, O, E, B>) => <TR, TO, TE>(self: Kind<T, TR, TO, TE, A>) => Kind<F, R, O, E, Kind<T, TR, TO, TE, B>>;
readonly sequenceNonEmpty: <F extends TypeLambda>(F: SemiApplicative<F>) => <TR, TO, TE, R, O, E, A>(self: Kind<T, TR, TO, TE, Kind<F, R, O, E, A>>) => Kind<F, R, O, E, Kind<T, TR, TO, TE, A>>;
traverseNonEmpty: <F extends TypeLambda>(F: SemiApplicative<F>) => <A, R, O, E, B>(f: (a: A) => Kind<F, R, O, E, B>) => <TR, TO, TE>(self: Kind<T, TR, TO, TE, A>) => Kind<F, R, O, E, Kind<T, TR, TO, TE, B>>;
sequenceNonEmpty: <F extends TypeLambda>(F: SemiApplicative<F>) => <TR, TO, TE, R, O, E, A>(self: Kind<T, TR, TO, TE, Kind<F, R, O, E, A>>) => Kind<F, R, O, E, Kind<T, TR, TO, TE, A>>;
}

@@ -18,0 +18,0 @@ /**

@@ -7,5 +7,3 @@ "use strict";

exports.traverseNonEmptyComposition = exports.sequenceNonEmptyComposition = exports.sequenceNonEmpty = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -22,6 +20,3 @@ * Returns a default `traverseNonEmpty` composition.

*/
exports.traverseNonEmptyComposition = traverseNonEmptyComposition;
const sequenceNonEmptyComposition = (T, G) => F => self => T.sequenceNonEmpty(F)((0, _Function.pipe)(self, T.map(G.sequenceNonEmpty(F))));

@@ -33,9 +28,5 @@ /**

*/
exports.sequenceNonEmptyComposition = sequenceNonEmptyComposition;
const sequenceNonEmpty = traverseNonEmpty => F => traverseNonEmpty(F)(_Function.identity);
exports.sequenceNonEmpty = sequenceNonEmpty;
//# sourceMappingURL=NonEmptyTraversable.js.map

@@ -10,3 +10,3 @@ /**

export interface Of<F extends TypeLambda> extends TypeClass<F> {
readonly of: <A>(a: A) => Kind<F, unknown, never, never, A>;
of: <A>(a: A) => Kind<F, unknown, never, never, A>;
}

@@ -13,0 +13,0 @@ /**

@@ -7,3 +7,2 @@ "use strict";

exports.unit = exports.ofComposition = exports.Do = void 0;
/**

@@ -18,6 +17,3 @@ * Returns a default `of` composition.

*/
exports.ofComposition = ofComposition;
const unit = F => F.of(undefined);

@@ -27,9 +23,5 @@ /**

*/
exports.unit = unit;
const Do = F => F.of({});
exports.Do = Do;
//# sourceMappingURL=Of.js.map

@@ -16,3 +16,3 @@ /**

export interface Order<A> {
readonly compare: (that: A) => (self: A) => -1 | 0 | 1;
compare: (that: A) => (self: A) => -1 | 0 | 1;
}

@@ -24,3 +24,3 @@ /**

export interface OrderTypeLambda extends TypeLambda {
readonly type: Order<this["Target"]>;
type: Order<this["Target"]>;
}

@@ -39,3 +39,3 @@ /**

*/
export declare const tuple: <A extends readonly any[]>(...orders: { [K in keyof A]: Order<A[K]>; }) => Order<Readonly<A>>;
export declare const tuple: <A extends any[]>(...orders: { [K in keyof A]: Order<A[K]>; }) => Order<Readonly<A>>;
/**

@@ -42,0 +42,0 @@ * @since 1.0.0

@@ -7,11 +7,6 @@ "use strict";

exports.tuple = exports.reverse = exports.min = exports.max = exports.lessThanOrEqualTo = exports.lessThan = exports.greaterThanOrEqualTo = exports.greaterThan = exports.getSemigroup = exports.getMonoid = exports.fromCompare = exports.contramap = exports.clamp = exports.between = exports.SemiProduct = exports.Product = exports.Invariant = exports.Contravariant = void 0;
var contravariant = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Contravariant"));
var monoid = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fp-ts/core/typeclass/Monoid"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**

@@ -31,12 +26,7 @@ * Main constructor.

*/
exports.fromCompare = fromCompare;
const tuple = (...orders) => fromCompare(that => self => {
let i = 0;
for (; i < orders.length - 1; i++) {
const r = orders[i].compare(that[i])(self[i]);
if (r !== 0) {

@@ -46,3 +36,2 @@ return r;

}
return orders[i].compare(that[i])(self[i]);

@@ -53,6 +42,3 @@ });

*/
exports.tuple = tuple;
const reverse = O => fromCompare(that => self => O.compare(self)(that));

@@ -62,6 +48,3 @@ /**

*/
exports.reverse = reverse;
const contramap = f => self => fromCompare(b2 => b1 => self.compare(f(b2))(f(b1)));

@@ -72,14 +55,9 @@ /**

*/
exports.contramap = contramap;
const getSemigroup = () => ({
combine: O2 => O1 => fromCompare(that => self => {
const out = O1.compare(that)(self);
if (out !== 0) {
return out;
}
return O2.compare(that)(self);

@@ -89,10 +67,7 @@ }),

let out = self.compare(a2)(a1);
if (out !== 0) {
return out;
}
for (const O of collection) {
out = O.compare(a2)(a1);
if (out !== 0) {

@@ -102,7 +77,5 @@ return out;

}
return out;
})
});
exports.getSemigroup = getSemigroup;

@@ -114,3 +87,2 @@ const empty = /*#__PURE__*/fromCompare(() => () => 0);

*/
const getMonoid = () => monoid.fromSemigroup(getSemigroup(), empty);

@@ -121,4 +93,2 @@ /**

*/
exports.getMonoid = getMonoid;

@@ -130,3 +100,2 @@ const Contravariant = /*#__PURE__*/contravariant.make(contramap);

*/
exports.Contravariant = Contravariant;

@@ -140,3 +109,2 @@ const Invariant = {

*/
exports.Invariant = Invariant;

@@ -152,5 +120,5 @@ const SemiProduct = {

*/
exports.SemiProduct = SemiProduct;
const Product = { ...SemiProduct,
const Product = {
...SemiProduct,
of: () => empty,

@@ -164,5 +132,3 @@ productAll: collection => tuple(...collection)

*/
exports.Product = Product;
const lessThan = O => that => self => O.compare(that)(self) === -1;

@@ -174,6 +140,3 @@ /**

*/
exports.lessThan = lessThan;
const greaterThan = O => that => self => O.compare(that)(self) === 1;

@@ -185,6 +148,3 @@ /**

*/
exports.greaterThan = greaterThan;
const lessThanOrEqualTo = O => that => self => O.compare(that)(self) !== 1;

@@ -196,6 +156,3 @@ /**

*/
exports.lessThanOrEqualTo = lessThanOrEqualTo;
const greaterThanOrEqualTo = O => that => self => O.compare(that)(self) !== -1;

@@ -207,6 +164,3 @@ /**

*/
exports.greaterThanOrEqualTo = greaterThanOrEqualTo;
const min = O => that => self => self === that || O.compare(that)(self) < 1 ? self : that;

@@ -218,6 +172,3 @@ /**

*/
exports.min = min;
const max = O => that => self => self === that || O.compare(that)(self) > -1 ? self : that;

@@ -229,6 +180,3 @@ /**

*/
exports.max = max;
const clamp = O => (minimum, maximum) => a => min(O)(max(O)(a)(minimum))(maximum);

@@ -240,9 +188,5 @@ /**

*/
exports.clamp = clamp;
const between = O => (minimum, maximum) => a => !lessThan(O)(minimum)(a) && !greaterThan(O)(maximum)(a);
exports.between = between;
//# sourceMappingURL=Order.js.map

@@ -12,3 +12,3 @@ /**

export interface Product<F extends TypeLambda> extends SemiProduct<F>, Of<F> {
readonly productAll: <R, O, E, A>(collection: Iterable<Kind<F, R, O, E, A>>) => Kind<F, R, O, E, ReadonlyArray<A>>;
productAll: <R, O, E, A>(collection: Iterable<Kind<F, R, O, E, A>>) => Kind<F, R, O, E, Array<A>>;
}

@@ -18,7 +18,7 @@ /**

*/
export declare const tuple: <F extends TypeLambda>(F: Product<F>) => <T extends readonly Kind<F, any, any, any, any>[]>(...components: T) => Kind<F, [T[number]] extends [Kind<F, infer R, any, any, any>] ? R : never, [T[number]] extends [Kind<F, any, infer O, any, any>] ? O : never, [T[number]] extends [Kind<F, any, any, infer E, any>] ? E : never, Readonly<{ [I in keyof T]: [T[I]] extends [Kind<F, any, any, any, infer A>] ? A : never; }>>;
export declare const tuple: <F extends TypeLambda>(F: Product<F>) => <T extends Kind<F, any, any, any, any>[]>(...components: T) => Kind<F, [T[number]] extends [Kind<F, infer R, any, any, any>] ? R : never, [T[number]] extends [Kind<F, any, infer O, any, any>] ? O : never, [T[number]] extends [Kind<F, any, any, infer E, any>] ? E : never, { [I in keyof T]: [T[I]] extends [Kind<F, any, any, any, infer A>] ? A : never; }>;
/**
* @since 1.0.0
*/
export declare const struct: <F extends TypeLambda>(F: Product<F>) => <R extends Record<string, Kind<F, any, any, any, any>>>(fields: R) => Kind<F, [R[keyof R]] extends [Kind<F, infer R_1, any, any, any>] ? R_1 : never, [R[keyof R]] extends [Kind<F, any, infer O, any, any>] ? O : never, [R[keyof R]] extends [Kind<F, any, any, infer E, any>] ? E : never, { readonly [K in keyof R]: [R[K]] extends [Kind<F, any, any, any, infer A>] ? A : never; }>;
export declare const struct: <F extends TypeLambda>(F: Product<F>) => <R extends Record<string, Kind<F, any, any, any, any>>>(fields: R) => Kind<F, [R[keyof R]] extends [Kind<F, infer R_1, any, any, any>] ? R_1 : never, [R[keyof R]] extends [Kind<F, any, infer O, any, any>] ? O : never, [R[keyof R]] extends [Kind<F, any, any, infer E, any>] ? E : never, { [K in keyof R]: [R[K]] extends [Kind<F, any, any, any, infer A>] ? A : never; }>;
//# sourceMappingURL=Product.d.ts.map

@@ -7,5 +7,3 @@ "use strict";

exports.tuple = exports.struct = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -18,6 +16,3 @@ * @since 1.0.0

*/
exports.tuple = tuple;
const struct = F => fields => {

@@ -27,12 +22,9 @@ const keys = Object.keys(fields);

const out = {};
for (let i = 0; i < values.length; i++) {
out[keys[i]] = values[i];
}
return out;
}, r => keys.map(k => r[k])));
};
exports.struct = struct;
//# sourceMappingURL=Product.js.map

@@ -7,5 +7,3 @@ "use strict";

exports.liftSemigroup = exports.lift3 = exports.lift2 = exports.ap = exports.andThenDiscard = exports.andThen = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -23,6 +21,3 @@ * Lift a `Semigroup` into 'F', the inner values are combined using the provided `Semigroup`.

*/
exports.liftSemigroup = liftSemigroup;
const ap = F => fa => self => (0, _Function.pipe)(self, F.product(fa), F.map(([f, a]) => f(a)));

@@ -32,6 +27,3 @@ /**

*/
exports.ap = ap;
const andThenDiscard = F => that => self => (0, _Function.pipe)(self, F.product(that), F.map(([a]) => a));

@@ -41,6 +33,3 @@ /**

*/
exports.andThenDiscard = andThenDiscard;
const andThen = F => that => self => (0, _Function.pipe)(self, F.product(that), F.map(([_, a]) => a));

@@ -52,6 +41,3 @@ /**

*/
exports.andThen = andThen;
const lift2 = F => f => (fa, fb) => (0, _Function.pipe)(fa, F.product(fb), F.map(([a, b]) => f(a, b)));

@@ -63,9 +49,5 @@ /**

*/
exports.lift2 = lift2;
const lift3 = F => f => (fa, fb, fc) => (0, _Function.pipe)(fa, F.product(fb), F.product(fc), F.map(([[a, b], c]) => f(a, b, c)));
exports.lift3 = lift3;
//# sourceMappingURL=SemiApplicative.js.map

@@ -12,4 +12,4 @@ /**

export interface SemiCoproduct<F extends TypeLambda> extends Invariant<F> {
readonly coproduct: <R2, O2, E2, B>(that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1, A>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O1 | O2, E1 | E2, A | B>;
readonly coproductMany: <R, O, E, A>(collection: Iterable<Kind<F, R, O, E, A>>) => (self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, A>;
coproduct: <R2, O2, E2, B>(that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1, A>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O1 | O2, E1 | E2, A | B>;
coproductMany: <R, O, E, A>(collection: Iterable<Kind<F, R, O, E, A>>) => (self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, A>;
}

@@ -16,0 +16,0 @@ /**

@@ -7,3 +7,2 @@ "use strict";

exports.getSemigroup = void 0;
/**

@@ -16,4 +15,3 @@ * @since 1.0.0

});
exports.getSemigroup = getSemigroup;
//# sourceMappingURL=SemiCoproduct.js.map

@@ -6,4 +6,4 @@ /**

* export interface Semigroup<A> {
* readonly combine: (that: A) => (self: A) => A
* readonly combineMany: (collection: Iterable<A>) => (self: A) => A
* combine: (that: A) => (self: A) => A
* combineMany: (collection: Iterable<A>) => (self: A) => A
* }

@@ -34,4 +34,4 @@ * ```

export interface Semigroup<A> {
readonly combine: (that: A) => (self: A) => A;
readonly combineMany: (collection: Iterable<A>) => (self: A) => A;
combine: (that: A) => (self: A) => A;
combineMany: (collection: Iterable<A>) => (self: A) => A;
}

@@ -43,3 +43,3 @@ /**

export interface SemigroupTypeLambda extends TypeLambda {
readonly type: Semigroup<this["Target"]>;
type: Semigroup<this["Target"]>;
}

@@ -83,3 +83,3 @@ /**

*/
export declare const struct: <A>(semigroups: { [K in keyof A]: Semigroup<A[K]>; }) => Semigroup<{ readonly [K_1 in keyof A]: A[K_1]; }>;
export declare const struct: <A>(semigroups: { [K in keyof A]: Semigroup<A[K]>; }) => Semigroup<{ [K_1 in keyof A]: A[K_1]; }>;
/**

@@ -90,3 +90,3 @@ * Given a tuple of associatives returns an associative for the tuple.

*/
export declare const tuple: <A extends readonly any[]>(...semigroups: { [K in keyof A]: Semigroup<A[K]>; }) => Semigroup<Readonly<A>>;
export declare const tuple: <A extends any[]>(...semigroups: { [K in keyof A]: Semigroup<A[K]>; }) => Semigroup<A>;
/**

@@ -93,0 +93,0 @@ * @since 1.0.0

@@ -7,5 +7,3 @@ "use strict";

exports.tuple = exports.struct = exports.reverse = exports.min = exports.max = exports.last = exports.intercalate = exports.imap = exports.fromCombine = exports.first = exports.constant = exports.SemiProduct = exports.Product = exports.Invariant = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -21,7 +19,5 @@ * Useful when `combineMany` can't be optimised.

let out = self;
for (const a of collection) {
out = combine(a)(out);
}
return out;

@@ -36,6 +32,3 @@ }

*/
exports.fromCombine = fromCombine;
const min = O => fromCombine(that => self => O.compare(that)(self) === -1 ? self : that);

@@ -48,6 +41,3 @@ /**

*/
exports.min = min;
const max = O => fromCombine(that => self => O.compare(that)(self) === 1 ? self : that);

@@ -58,6 +48,3 @@ /**

*/
exports.max = max;
const constant = a => ({

@@ -72,6 +59,3 @@ combine: () => () => a,

*/
exports.constant = constant;
const reverse = S => ({

@@ -89,9 +73,5 @@ combine: that => self => S.combine(self)(that),

*/
exports.reverse = reverse;
const struct = semigroups => fromCombine(that => self => {
const r = {};
for (const k in semigroups) {

@@ -102,3 +82,2 @@ if (Object.prototype.hasOwnProperty.call(semigroups, k)) {

}
return r;

@@ -111,6 +90,3 @@ });

*/
exports.struct = struct;
const tuple = (...semigroups) => fromCombine(that => self => semigroups.map((S, i) => S.combine(that[i])(self[i])));

@@ -120,6 +96,3 @@ /**

*/
exports.tuple = tuple;
const intercalate = separator => S => fromCombine(that => S.combineMany([separator, that]));

@@ -132,6 +105,3 @@ /**

*/
exports.intercalate = intercalate;
const first = () => ({

@@ -147,13 +117,9 @@ combine: () => _Function.identity,

*/
exports.first = first;
const last = () => ({
combine: second => () => second,
combineMany: collection => self => {
let a = self; // eslint-disable-next-line no-empty
let a = self;
// eslint-disable-next-line no-empty
for (a of collection) {}
return a;

@@ -165,6 +131,3 @@ }

*/
exports.last = last;
const imap = (to, from) => S => ({

@@ -178,4 +141,2 @@ combine: that => self => to(S.combine(from(that))(from(self))),

*/
exports.imap = imap;

@@ -189,5 +150,5 @@ const Invariant = {

*/
exports.Invariant = Invariant;
const SemiProduct = { ...Invariant,
const SemiProduct = {
...Invariant,
product: that => self => tuple(self, that),

@@ -200,5 +161,5 @@ productMany: collection => self => tuple(self, ...collection)

*/
exports.SemiProduct = SemiProduct;
const Product = { ...SemiProduct,
const Product = {
...SemiProduct,
of: constant,

@@ -205,0 +166,0 @@ productAll: collection => tuple(...collection)

@@ -13,4 +13,4 @@ /**

export interface SemiProduct<F extends TypeLambda> extends Invariant<F> {
readonly product: <R2, O2, E2, B>(that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1, A>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O1 | O2, E1 | E2, readonly [A, B]>;
readonly productMany: <R, O, E, A>(collection: Iterable<Kind<F, R, O, E, A>>) => (self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, readonly [A, ...ReadonlyArray<A>]>;
product: <R2, O2, E2, B>(that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1, A>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O1 | O2, E1 | E2, [A, B]>;
productMany: <R, O, E, A>(collection: Iterable<Kind<F, R, O, E, A>>) => (self: Kind<F, R, O, E, A>) => Kind<F, R, O, E, [A, ...Array<A>]>;
}

@@ -22,3 +22,3 @@ /**

*/
export declare const productComposition: <F extends TypeLambda, G extends TypeLambda>(F: SemiApplicative<F>, G: SemiProduct<G>) => <FR2, FO2, FE2, GR2, GO2, GE2, B>(that: Kind<F, FR2, FO2, FE2, Kind<G, GR2, GO2, GE2, B>>) => <FR1, FO1, FE1, GR1, GO1, GE1, A>(self: Kind<F, FR1, FO1, FE1, Kind<G, GR1, GO1, GE1, A>>) => Kind<F, FR1 & FR2, FO2 | FO1, FE2 | FE1, Kind<G, GR1 & GR2, GO2 | GO1, GE2 | GE1, readonly [A, B]>>;
export declare const productComposition: <F extends TypeLambda, G extends TypeLambda>(F: SemiApplicative<F>, G: SemiProduct<G>) => <FR2, FO2, FE2, GR2, GO2, GE2, B>(that: Kind<F, FR2, FO2, FE2, Kind<G, GR2, GO2, GE2, B>>) => <FR1, FO1, FE1, GR1, GO1, GE1, A>(self: Kind<F, FR1, FO1, FE1, Kind<G, GR1, GO1, GE1, A>>) => Kind<F, FR1 & FR2, FO2 | FO1, FE2 | FE1, Kind<G, GR1 & GR2, GO2 | GO1, GE2 | GE1, [A, B]>>;
/**

@@ -29,3 +29,3 @@ * Returns a default `productMany` composition.

*/
export declare const productManyComposition: <F extends TypeLambda, G extends TypeLambda>(F: SemiApplicative<F>, G: SemiProduct<G>) => <FR, FO, FE, GR, GO, GE, A>(collection: Iterable<Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, A>>>) => (self: Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, A>>) => Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, readonly [A, ...A[]]>>;
export declare const productManyComposition: <F extends TypeLambda, G extends TypeLambda>(F: SemiApplicative<F>, G: SemiProduct<G>) => <FR, FO, FE, GR, GO, GE, A>(collection: Iterable<Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, A>>>) => (self: Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, A>>) => Kind<F, FR, FO, FE, Kind<G, GR, GO, GE, [A, ...A[]]>>;
/**

@@ -37,21 +37,21 @@ * Returns a default `productMany` implementation (useful for tests).

*/
export declare const productMany: <F extends TypeLambda>(Covariant: Covariant<F>, product: <R2, O2, E2, B>(that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1, A>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, readonly [A, B]>) => <R, O, E, A_1>(collection: Iterable<Kind<F, R, O, E, A_1>>) => (self: Kind<F, R, O, E, A_1>) => Kind<F, R, O, E, readonly [A_1, ...A_1[]]>;
export declare const productMany: <F extends TypeLambda>(Covariant: Covariant<F>, product: <R2, O2, E2, B>(that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1, A>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, [A, B]>) => <R, O, E, A_1>(collection: Iterable<Kind<F, R, O, E, A_1>>) => (self: Kind<F, R, O, E, A_1>) => Kind<F, R, O, E, [A_1, ...A_1[]]>;
/**
* @since 1.0.0
*/
export declare const andThenBind: <F extends TypeLambda>(F: SemiProduct<F>) => <N extends string, A extends object, R2, O2, E2, B>(name: Exclude<N, keyof A>, that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
export declare const andThenBind: <F extends TypeLambda>(F: SemiProduct<F>) => <N extends string, A extends object, R2, O2, E2, B>(name: Exclude<N, keyof A>, that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, { [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
/**
* @since 1.0.0
*/
export declare const productFlatten: <F extends TypeLambda>(F: SemiProduct<F>) => <R2, O2, E2, B>(that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1, A extends readonly any[]>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, readonly [...A, B]>;
export declare const productFlatten: <F extends TypeLambda>(F: SemiProduct<F>) => <R2, O2, E2, B>(that: Kind<F, R2, O2, E2, B>) => <R1, O1, E1, A extends any[]>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, [...A, B]>;
/**
* @since 1.0.0
*/
export declare const nonEmptyTuple: <F extends TypeLambda>(F: SemiProduct<F>) => <T extends [Kind<F, any, any, any, any>, ...Kind<F, any, any, any, any>[]]>(...components: T) => Kind<F, [T[number]] extends [Kind<F, infer R, any, any, any>] ? R : never, [T[number]] extends [Kind<F, any, infer O, any, any>] ? O : never, [T[number]] extends [Kind<F, any, any, infer E, any>] ? E : never, Readonly<{ [I in keyof T]: [T[I]] extends [Kind<F, any, any, any, infer A>] ? A : never; }>>;
declare type EnforceNonEmptyRecord<R> = keyof R extends never ? never : R;
export declare const nonEmptyTuple: <F extends TypeLambda>(F: SemiProduct<F>) => <T extends [Kind<F, any, any, any, any>, ...Kind<F, any, any, any, any>[]]>(...components: T) => Kind<F, [T[number]] extends [Kind<F, infer R, any, any, any>] ? R : never, [T[number]] extends [Kind<F, any, infer O, any, any>] ? O : never, [T[number]] extends [Kind<F, any, any, infer E, any>] ? E : never, { [I in keyof T]: [T[I]] extends [Kind<F, any, any, any, infer A>] ? A : never; }>;
type EnforceNonEmptyRecord<R> = keyof R extends never ? never : R;
/**
* @since 1.0.0
*/
export declare const nonEmptyStruct: <F extends TypeLambda>(F: SemiProduct<F>) => <R extends Record<string, Kind<F, any, any, any, any>>>(fields: EnforceNonEmptyRecord<R> & Record<string, Kind<F, any, any, any, any>>) => Kind<F, [R[keyof R]] extends [Kind<F, infer R_1, any, any, any>] ? R_1 : never, [R[keyof R]] extends [Kind<F, any, infer O, any, any>] ? O : never, [R[keyof R]] extends [Kind<F, any, any, infer E, any>] ? E : never, { readonly [K in keyof R]: [R[K]] extends [Kind<F, any, any, any, infer A>] ? A : never; }>;
export declare const nonEmptyStruct: <F extends TypeLambda>(F: SemiProduct<F>) => <R extends Record<string, Kind<F, any, any, any, any>>>(fields: EnforceNonEmptyRecord<R> & Record<string, Kind<F, any, any, any, any>>) => Kind<F, [R[keyof R]] extends [Kind<F, infer R_1, any, any, any>] ? R_1 : never, [R[keyof R]] extends [Kind<F, any, infer O, any, any>] ? O : never, [R[keyof R]] extends [Kind<F, any, any, infer E, any>] ? E : never, { [K in keyof R]: [R[K]] extends [Kind<F, any, any, any, infer A>] ? A : never; }>;
export {};
//# sourceMappingURL=SemiProduct.d.ts.map

@@ -7,5 +7,3 @@ "use strict";

exports.productManyComposition = exports.productMany = exports.productFlatten = exports.productComposition = exports.nonEmptyTuple = exports.nonEmptyStruct = exports.andThenBind = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -22,6 +20,3 @@ * Returns a default `product` composition.

*/
exports.productComposition = productComposition;
const productManyComposition = (F, G) => collection => self => (0, _Function.pipe)(self, F.productMany(collection), F.map(([ga, ...gas]) => (0, _Function.pipe)(ga, G.productMany(gas))));

@@ -34,13 +29,8 @@ /**

*/
exports.productManyComposition = productManyComposition;
const productMany = (Covariant, product) => collection => self => {
let out = (0, _Function.pipe)(self, Covariant.map(a => [a]));
for (const fa of collection) {
out = (0, _Function.pipe)(out, product(fa), Covariant.map(([[head, ...tail], a]) => [head, ...tail, a]));
}
return out;

@@ -51,6 +41,3 @@ };

*/
exports.productMany = productMany;
const andThenBind = F => (name, that) => self => (0, _Function.pipe)(self, F.product(that), F.imap(([a, b]) => Object.assign({}, a, {

@@ -65,6 +52,3 @@ [name]: b

*/
exports.andThenBind = andThenBind;
const productFlatten = F => that => self => (0, _Function.pipe)(self, F.product(that), F.imap(([a, b]) => [...a, b], ab => [ab.slice(0, -1), ab[ab.length - 1]]));

@@ -74,6 +58,3 @@ /**

*/
exports.productFlatten = productFlatten;
const nonEmptyTuple = F => (...components) => F.productMany(components.slice(1))(components[0]);

@@ -83,6 +64,3 @@ /**

*/
exports.nonEmptyTuple = nonEmptyTuple;
const nonEmptyStruct = F => fields => {

@@ -94,12 +72,9 @@ const keys = Object.keys(fields);

};
for (let i = 0; i < values.length; i++) {
out[keys[i + 1]] = values[i];
}
return out;
}, r => keys.map(k => r[k])));
};
exports.nonEmptyStruct = nonEmptyStruct;
//# sourceMappingURL=SemiProduct.js.map

@@ -12,4 +12,4 @@ /**

export interface Traversable<T extends TypeLambda> extends TypeClass<T> {
readonly traverse: <F extends TypeLambda>(F: Applicative<F>) => <A, R, O, E, B>(f: (a: A) => Kind<F, R, O, E, B>) => <TR, TO, TE>(self: Kind<T, TR, TO, TE, A>) => Kind<F, R, O, E, Kind<T, TR, TO, TE, B>>;
readonly sequence: <F extends TypeLambda>(F: Applicative<F>) => <TR, TO, TE, R, O, E, A>(self: Kind<T, TR, TO, TE, Kind<F, R, O, E, A>>) => Kind<F, R, O, E, Kind<T, TR, TO, TE, A>>;
traverse: <F extends TypeLambda>(F: Applicative<F>) => <A, R, O, E, B>(f: (a: A) => Kind<F, R, O, E, B>) => <TR, TO, TE>(self: Kind<T, TR, TO, TE, A>) => Kind<F, R, O, E, Kind<T, TR, TO, TE, B>>;
sequence: <F extends TypeLambda>(F: Applicative<F>) => <TR, TO, TE, R, O, E, A>(self: Kind<T, TR, TO, TE, Kind<F, R, O, E, A>>) => Kind<F, R, O, E, Kind<T, TR, TO, TE, A>>;
}

@@ -16,0 +16,0 @@ /**

@@ -7,5 +7,3 @@ "use strict";

exports.traverseTap = exports.traverseComposition = exports.sequenceComposition = exports.sequence = void 0;
var _Function = /*#__PURE__*/require("@fp-ts/core/internal/Function");
/**

@@ -22,6 +20,3 @@ * Returns a default `traverse` composition.

*/
exports.traverseComposition = traverseComposition;
const sequenceComposition = (T, G) => F => self => T.sequence(F)((0, _Function.pipe)(self, T.map(G.sequence(F))));

@@ -33,6 +28,3 @@ /**

*/
exports.sequenceComposition = sequenceComposition;
const sequence = traverse => F => traverse(F)(_Function.identity);

@@ -47,9 +39,5 @@ /**

*/
exports.sequence = sequence;
const traverseTap = T => F => f => T.traverse(F)(a => (0, _Function.pipe)(f(a), F.map(() => a)));
exports.traverseTap = traverseTap;
//# sourceMappingURL=Traversable.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc