import type { Either } from "./model"; /** * ```haskell * _fold :: (Either e a, (e -> b), (a -> c)) -> b | c * ``` * * Takes two functions and an `Either` value, if the value is a `Left` the inner value is applied to the first function, * if the value is a `Right` the inner value is applied to the second function. * * @category Destructors * @since 1.0.0 */ export declare const fold_: (pab: Either, onLeft: (e: E) => B, onRight: (a: A) => C) => B | C; /** * ```haskell * fold :: ((e -> b), (a -> c)) -> Either e a -> b | c * ``` * * Takes two functions and an `Either` value, if the value is a `Left` the inner value is applied to the first function, * if the value is a `Right` the inner value is applied to the second function. * * @category Destructors * @since 1.0.0 */ export declare const fold: (onLeft: (e: E) => B, onRight: (a: A) => C) => (pab: Either) => B | C; /** * ```haskell * either :: ((e -> b), (a -> c)) -> Either e a -> b | c * ``` */ export declare const either: (onLeft: (e: E) => B, onRight: (a: A) => C) => (pab: Either) => B | C; /** * ```haskell * _getOrElse :: (Either e a, (e -> b)) -> a | b * ``` * * @category Destructors * @since 1.0.0 */ export declare const getOrElse_: (pab: Either, onLeft: (e: E) => B) => A | B; /** * ```haskell * _getOrElse :: (e -> b) -> Either e a -> a | b * ``` * * @category Destructors * @since 1.0.0 */ export declare const getOrElse: (f: (e: E) => B) => (pab: Either) => A | B; /** * ```haskell * merge :: Either e a -> e | a * ``` * * @category Destructors * @since 1.0.0 */ export declare const merge: (pab: Either) => E | A; //# sourceMappingURL=destructors.d.ts.map