/** * @since 2.0.0 */ import { Comonad2 } from './Comonad' import { Endomorphism } from './Endomorphism' import { Functor as FunctorHKT, Functor1, Functor2, Functor2C, Functor3, Functor3C } from './Functor' import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from './HKT' /** * @category model * @since 2.0.0 */ export interface Store { readonly peek: (s: S) => A readonly pos: S } /** * Reposition the focus at the specified position * * @since 2.0.0 */ export declare function seek(s: S): (wa: Store) => Store /** * Reposition the focus at the specified position, which depends on the current position * * @since 2.0.0 */ export declare function seeks(f: Endomorphism): (wa: Store) => Store /** * Extract a value from a position which depends on the current position * * @since 2.0.0 */ export declare function peeks(f: Endomorphism): (wa: Store) => A /** * Extract a collection of values from positions which depend on the current position * * @since 2.0.0 */ export declare function experiment( F: Functor3 ): (f: (s: S) => Kind3) => (wa: Store) => Kind3 export declare function experiment( F: Functor3C ): (f: (s: S) => Kind3) => (wa: Store) => Kind3 export declare function experiment( F: Functor2 ): (f: (s: S) => Kind2) => (wa: Store) => Kind2 export declare function experiment( F: Functor2C ): (f: (s: S) => Kind2) => (wa: Store) => Kind2 export declare function experiment( F: Functor1 ): (f: (s: S) => Kind) => (wa: Store) => Kind export declare function experiment( F: FunctorHKT ): (f: (s: S) => HKT) => (wa: Store) => HKT /** * @since 2.0.0 */ export declare const extend: (f: (wa: Store) => B) => (wa: Store) => Store /** * @category Extract * @since 2.6.2 */ export declare const extract: (wa: Store) => A /** * @since 2.0.0 */ export declare const duplicate: (wa: Store) => Store> /** * `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: Store) => Store /** * @category type lambdas * @since 2.0.0 */ export declare const URI = 'Store' /** * @category type lambdas * @since 2.0.0 */ export declare type URI = typeof URI declare module './HKT' { interface URItoKind2 { readonly [URI]: Store } } /** * @category instances * @since 2.7.0 */ export declare const Functor: Functor2 /** * @category mapping * @since 2.10.0 */ export declare const flap: (a: A) => (fab: Store B>) => Store /** * @category instances * @since 2.7.0 */ export declare const Comonad: Comonad2 /** * This instance is deprecated, use small, specific instances instead. * For example if a function needs a `Comonad` instance, pass `S.Comonad` instead of `S.store` * (where `S` is from `import S from 'fp-ts/Store'`) * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const store: Comonad2