/** * @since 2.0.0 */ import { Applicative2C } from './Applicative' import { Apply2C } from './Apply' import { Chain2C } from './Chain' import { Functor2 } from './Functor' import { Monad2C } from './Monad' import { Monoid } from './Monoid' import { Pointed2C } from './Pointed' import { Semigroup } from './Semigroup' /** * @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 declare type URI = typeof URI declare module './HKT' { interface URItoKind2 { readonly [URI]: Writer } } /** * @category instances * @since 2.10.0 */ export declare const getPointed: (M: Monoid) => Pointed2C<'Writer', W> /** * @category instances * @since 2.10.0 */ export declare const getApply: (S: Semigroup) => Apply2C<'Writer', W> /** * @category instances * @since 2.10.0 */ export declare const getApplicative: (M: Monoid) => Applicative2C<'Writer', W> /** * @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: Writer B>) => Writer /** * @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