import type * as P from "@principia/prelude"; import type { Either, URI, V } from "./model"; /** * ```haskell * swap :: Bifunctor p => p a b -> p b a * ``` * * Swaps the positions of a Bifunctor's arguments * * @category AltBifunctor * @since 1.0.0 */ export declare const swap: (pab: Either) => Either; /** * ```haskell * bimap_ :: Bifunctor p => (p a b, (a -> c), (b -> d)) -> p c d * ``` * * Map a pair of functions over the two type arguments of the bifunctor. * * @category Bifunctor * @since 1.0.0 */ export declare const bimap_: (pab: Either, f: (e: E) => G, g: (a: A) => B) => Either; /** * ```haskell * bimap :: Bifunctor p => ((a -> c), (b -> d)) -> p a b -> p c d * ``` * * Map a pair of functions over the two type arguments of the bifunctor. * * @category Bifunctor * @since 1.0.0 */ export declare const bimap: (f: (e: E) => G, g: (a: A) => B) => (pab: Either) => Either; /** * ```haskell * first_ :: Bifunctor p => (p a c, (a -> b)) -> p b c * ``` * * Map a function over the first type argument of a bifunctor. * * @category Bifunctor * @since 1.0.0 */ export declare const first_: (pab: Either, f: (e: E) => G) => Either; /** * ```haskell * first :: Bifunctor p => (a -> c) -> p a b -> p c b * ``` * * Map a function over the first type argument of a bifunctor. * * @category Bifunctor * @since 1.0.0 */ export declare const first: (f: (e: E) => G) => (pab: Either) => Either; /** * ```haskell * mapLeft_ :: Bifunctor p => (p a c, (a -> b)) -> p b c * ``` * * Map a function over the first type argument of a bifunctor. * * @category Bifunctor * @since 1.0.0 */ export declare const mapLeft_: (pab: Either, f: (e: E) => G) => Either; /** * ```haskell * mapLeft :: Bifunctor p => (a -> c) -> p a b -> p c b * ``` * * Map a function over the first type argument of a bifunctor. * * @category Bifunctor * @since 1.0.0 */ export declare const mapLeft: (f: (e: E) => G) => (pab: Either) => Either; /** * @category Instances * @since 1.0.0 */ export declare const Bifunctor: P.Bifunctor<[URI], V>; /** * @category Instances * @since 1.0.0 */ export declare const Bifunctor2: P.Bifunctor2; //# sourceMappingURL=bifunctor.d.ts.map