/** * @since 2.0.0 */ import { Applicative2C } from './Applicative.js'; import { Apply2C } from './Apply.js'; import { Chain2C } from './Chain.js'; import { Functor2 } from './Functor.js'; import { Monad2C } from './Monad.js'; import { Monoid } from './Monoid.js'; import { Pointed2C } from './Pointed.js'; import { Semigroup } from './Semigroup.js'; /** * @category model * @since 2.0.0 */ export interface Writer { (): [A, W]; } /** * Appends a value to the accumulator * * @category constructors * @since 2.0.0 */ export declare const tell: (w: W) => Writer; /** * Modifies the result to include the changes to the accumulator * * @since 2.0.0 */ export declare const listen: (fa: Writer) => Writer; /** * Applies the returned function to the accumulator * * @since 2.0.0 */ export declare const pass: (fa: Writer W]>) => Writer; /** * Projects a value from modifications made to the accumulator during an action * * @since 2.0.0 */ export declare const listens: (f: (w: W) => B) => (fa: Writer) => Writer; /** * Modify the final accumulator value by applying a function * * @since 2.0.0 */ export declare const censor: (f: (w: W) => W) => (fa: Writer) => Writer; /** * `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: Writer) => Writer; /** * @category type lambdas * @since 2.0.0 */ export declare const URI = "Writer"; /** * @category type lambdas * @since 2.0.0 */ export type URI = typeof URI; declare module './HKT.js' { interface URItoKind2 { readonly [URI]: Writer; } } /** * @category instances * @since 2.10.0 */ export declare const getPointed: (M: Monoid) => Pointed2C; /** * @category instances * @since 2.10.0 */ export declare const getApply: (S: Semigroup) => Apply2C; /** * @category instances * @since 2.10.0 */ export declare const getApplicative: (M: Monoid) => Applicative2C; /** * @category instances * @since 2.10.0 */ export declare function getChain(S: Semigroup): Chain2C; /** * @category instances * @since 2.0.0 */ export declare function getMonad(M: Monoid): Monad2C; /** * @category instances * @since 2.7.0 */ export declare const Functor: Functor2; /** * @category mapping * @since 2.10.0 */ export declare const flap: (a: A) => (fab: import("./HKT.js").Kind2<"Writer", E, (a: A) => B>) => import("./HKT.js").Kind2<"Writer", E, B>; /** * @since 2.8.0 */ export declare const evaluate: (fa: Writer) => A; /** * @since 2.8.0 */ export declare const execute: (fa: Writer) => W; /** * Use [`evaluate`](#evaluate) instead * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const evalWriter: (fa: Writer) => A; /** * Use [`execute`](#execute) instead * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const execWriter: (fa: Writer) => W; /** * Use [`Functor`](#functor) instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const writer: Functor2;