import type * as E from "../../Either"; import type { XRef } from "./model"; /** * Folds over the error and value types of the `XRef`. This is a highly * polymorphic method that is capable of arbitrarily transforming the error * and value types of the `XRef`. For most use cases one of the more specific * combinators implemented in terms of `fold` will be more ergonomic but this * method is extremely useful for implementing new combinators. */ export declare const fold: ( ea: (_: EA) => EC, eb: (_: EB) => ED, ca: (_: C) => E.Either, bd: (_: B) => E.Either ) => (ref: XRef) => XRef; /** * Folds over the error and value types of the `XRef`. This is a highly * polymorphic method that is capable of arbitrarily transforming the error * and value types of the `XRef`. For most use cases one of the more specific * combinators implemented in terms of `fold` will be more ergonomic but this * method is extremely useful for implementing new combinators. */ export declare const fold_: ( ref: XRef, ea: (_: EA) => EC, eb: (_: EB) => ED, ca: (_: C) => E.Either, bd: (_: B) => E.Either ) => XRef; /** * Folds over the error and value types of the `XRef`, allowing access to * the state in transforming the `set` value. This is a more powerful version * of `fold` but requires unifying the error types. */ export declare const foldAll: ( ea: (_: EA) => EC, eb: (_: EB) => ED, ec: (_: EB) => EC, ca: (_: C) => (_: B) => E.Either, bd: (_: B) => E.Either ) => (ref: XRef) => XRef; /** * Folds over the error and value types of the `XRef`, allowing access to * the state in transforming the `set` value. This is a more powerful version * of `fold` but requires unifying the error types. */ export declare const foldAll_: ( ref: XRef, ea: (_: EA) => EC, eb: (_: EB) => ED, ec: (_: EB) => EC, ca: (_: C) => (_: B) => E.Either, bd: (_: B) => E.Either ) => XRef; //# sourceMappingURL=fold.d.ts.map