/**
* @since 2.0.0
*/
import { Alt1 } from './Alt'
import { Applicative1 } from './Applicative'
import { Apply1 } from './Apply'
import { Chain1 } from './Chain'
import { ChainRec1 } from './ChainRec'
import { Comonad1 } from './Comonad'
import { Eq } from './Eq'
import { Foldable1 } from './Foldable'
import { Functor1 } from './Functor'
import { Monad1 } from './Monad'
import { Monoid } from './Monoid'
import { Pointed1 } from './Pointed'
import { Show } from './Show'
import { PipeableTraverse1, Traversable1 } from './Traversable'
/**
* @category model
* @since 2.0.0
*/
export declare 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
/**
* Composes computations in sequence, using the return value of one computation to determine the next computation.
*
* @category sequencing
* @since 2.0.0
*/
export declare const chain: (f: (a: A) => Identity) => (ma: 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 declare type URI = typeof URI
declare module './HKT' {
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: (a: A) => B) => 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: A) => A
/**
* Combine two effectful actions, keeping only the result of the second.
*
* @since 2.0.0
*/
export declare const apSecond: (second: B) => (first: A) => 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 sequencing
* @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: A) => { readonly [K in N]: A }
declare const let_: (
name: Exclude,
f: (a: A) => B
) => (fa: A) => { readonly [K in N | keyof A]: 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) => B
) => (ma: A) => { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }
/**
* @category do notation
* @since 2.8.0
*/
export declare const apS: (
name: Exclude,
fb: B
) => (fa: A) => { readonly [K in N | keyof A]: K extends keyof A ? A[K] : B }
/**
* 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