/**
* @since 2.0.0
*/
import { Alt1 } from './Alt.js';
import { Applicative1 } from './Applicative.js';
import { Apply1 } from './Apply.js';
import { Chain1 } from './Chain.js';
import { ChainRec1 } from './ChainRec.js';
import { Comonad1 } from './Comonad.js';
import { Eq } from './Eq.js';
import { Foldable1 } from './Foldable.js';
import { Functor1 } from './Functor.js';
import { Monad1 } from './Monad.js';
import { Monoid } from './Monoid.js';
import { Pointed1 } from './Pointed.js';
import { Show } from './Show.js';
import { PipeableTraverse1, Traversable1 } from './Traversable.js';
/**
* @category model
* @since 2.0.0
*/
export type Identity = A;
/**
* `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types
* use the type constructor `F` to represent some computational context.
*
* @category mapping
* @since 2.0.0
*/
export declare const map: (f: (a: A) => B) => (fa: Identity) => Identity;
/**
* @since 2.0.0
*/
export declare const ap: (fa: Identity) => (fab: Identity<(a: A) => B>) => Identity;
/**
* @category constructors
* @since 2.0.0
*/
export declare const of: (a: A) => Identity;
/**
* @category sequencing
* @since 2.14.0
*/
export declare const flatMap: {
(f: (a: A) => Identity): (ma: Identity) => Identity;
(ma: Identity, f: (a: A) => Identity): Identity;
};
/**
* @since 2.0.0
*/
export declare const extend: (f: (wa: Identity) => B) => (wa: Identity) => Identity;
/**
* @category Extract
* @since 2.6.2
*/
export declare const extract: (wa: Identity) => A;
/**
* @since 2.0.0
*/
export declare const duplicate: (ma: Identity) => Identity>;
/**
* @category sequencing
* @since 2.0.0
*/
export declare const flatten: (mma: Identity>) => Identity;
/**
* @category folding
* @since 2.0.0
*/
export declare const reduce: (b: B, f: (b: B, a: A) => B) => (fa: Identity) => B;
/**
* @category folding
* @since 2.0.0
*/
export declare const foldMap: (M: Monoid) => (f: (a: A) => M) => (fa: Identity) => M;
/**
* @category folding
* @since 2.0.0
*/
export declare const reduceRight: (b: B, f: (a: A, b: B) => B) => (fa: Identity) => B;
/**
* @category traversing
* @since 2.6.3
*/
export declare const traverse: PipeableTraverse1;
/**
* @category traversing
* @since 2.6.3
*/
export declare const sequence: Traversable1['sequence'];
/**
* Less strict version of [`alt`](#alt).
*
* The `W` suffix (short for **W**idening) means that the return types will be merged.
*
* @category error handling
* @since 2.9.0
*/
export declare const altW: (that: () => Identity) => (fa: Identity) => Identity;
/**
* Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to
* types of kind `* -> *`.
*
* @category error handling
* @since 2.0.0
*/
export declare const alt: (that: () => Identity) => (fa: Identity) => Identity;
/**
* @category type lambdas
* @since 2.0.0
*/
export declare const URI = "Identity";
/**
* @category type lambdas
* @since 2.0.0
*/
export type URI = typeof URI;
declare module './HKT.js' {
interface URItoKind {
readonly [URI]: Identity;
}
}
/**
* @category instances
* @since 2.0.0
*/
export declare const getShow: (S: Show) => Show>;
/**
* @category instances
* @since 2.0.0
*/
export declare const getEq: (E: Eq) => Eq>;
/**
* @category instances
* @since 2.7.0
*/
export declare const Functor: Functor1;
/**
* @category mapping
* @since 2.10.0
*/
export declare const flap: (a: A) => (fab: import("./HKT.js").Kind<"Identity", (a: A) => B>) => import("./HKT.js").Kind<"Identity", B>;
/**
* @category instances
* @since 2.10.0
*/
export declare const Pointed: Pointed1;
/**
* @category instances
* @since 2.10.0
*/
export declare const Apply: Apply1;
/**
* Combine two effectful actions, keeping only the result of the first.
*
* @since 2.0.0
*/
export declare const apFirst: (second: B) => (first: import("./HKT.js").Kind<"Identity", A>) => import("./HKT.js").Kind<"Identity", A>;
/**
* Combine two effectful actions, keeping only the result of the second.
*
* @since 2.0.0
*/
export declare const apSecond: (second: B) => (first: import("./HKT.js").Kind<"Identity", A>) => import("./HKT.js").Kind<"Identity", B>;
/**
* @category instances
* @since 2.7.0
*/
export declare const Applicative: Applicative1;
/**
* @category instances
* @since 2.10.0
*/
export declare const Chain: Chain1;
/**
* @category instances
* @since 2.7.0
*/
export declare const Monad: Monad1;
/**
* Composes computations in sequence, using the return value of one computation to determine the next computation and
* keeping only the result of the first.
*
* @category combinators
* @since 2.16.7
*/
export declare const tap: {
(self: Identity, f: (a: A) => Identity<_>): Identity;
(f: (a: A) => Identity<_>): (self: Identity) => Identity;
};
/**
* Alias of `tap`
*
* @category legacy
* @since 2.0.0
*/
export declare const chainFirst: (f: (a: A) => B) => (first: A) => A;
/**
* @category instances
* @since 2.7.0
*/
export declare const Foldable: Foldable1;
/**
* @category instances
* @since 2.7.0
*/
export declare const Traversable: Traversable1;
/**
* @category instances
* @since 2.7.0
*/
export declare const Alt: Alt1;
/**
* @category instances
* @since 2.7.0
*/
export declare const Comonad: Comonad1;
/**
* @category instances
* @since 2.7.0
*/
export declare const ChainRec: ChainRec1;
/**
* @category do notation
* @since 2.9.0
*/
export declare const Do: Identity<{}>;
/**
* @category do notation
* @since 2.8.0
*/
export declare const bindTo: (name: N) => (fa: import("./HKT.js").Kind<"Identity", A>) => import("./HKT.js").Kind<"Identity", { readonly [K in N]: A; }>;
declare const let_: (name: Exclude, f: (a: A) => B) => (fa: import("./HKT.js").Kind<"Identity", A>) => import("./HKT.js").Kind<"Identity", {
/**
* @category instances
* @since 2.7.0
*/
readonly [K in keyof A | N]: K extends keyof A ? A[K] : B; }>;
export {
/**
* @category do notation
* @since 2.13.0
*/
let_ as let };
/**
* @category do notation
* @since 2.8.0
*/
export declare const bind: (name: Exclude, f: (a: A) => import("./HKT.js").Kind<"Identity", B>) => (ma: import("./HKT.js").Kind<"Identity", A>) => import("./HKT.js").Kind<"Identity", { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B; }>;
/**
* @category do notation
* @since 2.8.0
*/
export declare const apS: (name: Exclude, fb: B) => (fa: import("./HKT.js").Kind<"Identity", A>) => import("./HKT.js").Kind<"Identity", { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B; }>;
/**
* Alias of `flatMap`.
*
* @category legacy
* @since 2.0.0
*/
export declare const chain: (f: (a: A) => Identity) => (ma: Identity) => Identity;
/**
* This instance is deprecated, use small, specific instances instead.
* For example if a function needs a `Functor` instance, pass `I.Functor` instead of `I.identity`
* (where `I` is from `import I from 'fp-ts/Identity'`)
*
* @category zone of death
* @since 2.0.0
* @deprecated
*/
export declare const identity: Monad1 & Foldable1 & Traversable1 & Alt1 & Comonad1 & ChainRec1;