UNPKG

effect-ts-folds

Version:
23 lines 1.02 kB
import { Either as EI } from 'effect'; /** * Run a pair of functions on the same value and return the result tuple. * @category pair */ export declare const fanout: <A, B, C>(ab: (a: A) => B, ac: (a: A) => C) => (a: A) => [B, C]; /** * Convert a pair of functions into a function that runs the first on left and * the second on right. * @category pair */ export declare const fanin: <A, B, C>(ba: (b: B) => A, ca: (c: C) => A) => ((ei: EI.Either<C, B>) => A); /** * Map over both members of a pair with a single function. * @category pair */ export declare const pairMap: <A, B>(ab: (a: A) => B) => ([a1, a2]: [A, A]) => [B, B]; export declare const pairWithFirst: <A>(first: A) => <B>(second: B) => [A, B]; export declare const pairWithSecond: <B>(second: B) => <A>(first: A) => [A, B]; export declare const square: <A>(a: A) => [A, A]; export declare const squareMapFirst: <A, B>(f: (a: A) => B) => (o: A) => [B, A]; export declare const pair: <A, B>(a: A, b: B) => [A, B]; //# sourceMappingURL=Pair.d.ts.map