import type * as P from "@principia/prelude"; import type { IO, URI, V } from "./model"; /** * ```haskell * ap_ :: Apply f => (f (a -> b), f a) -> f b * ``` * * Apply a function to an argument under a type constructor * * @category Apply * @since 1.0.0 */ export declare const ap_: (fab: IO<(a: A) => B>, fa: IO) => IO; /** * ```haskell * ap :: Apply f => f a -> f (a -> b) -> f b * ``` * * Apply a function to an argument under a type constructor * * @category Apply * @since 1.0.0 */ export declare const ap: (fa: IO) => (fab: IO<(a: A) => B>) => IO; /** * ```haskell * apFirst_ :: Apply f => (f a, f b) -> f a * ``` * * Combine two effectful actions, keeping only the result of the first * * @category Apply * @since 1.0.0 */ export declare const apFirst_: (fa: IO, fb: IO) => IO; /** * ```haskell * apFirst :: Apply f => f b -> f a -> f a * ``` * * Combine two effectful actions, keeping only the result of the first * * @category Apply * @since 1.0.0 */ export declare const apFirst: (fb: IO) => (fa: IO) => IO; /** * ```haskell * apSecond_ :: Apply f => (f a, f b) -> f b * ``` * * Combine two effectful actions, keeping only the result of the second * * @category Apply * @since 1.0.0 */ export declare const apSecond_: (fa: IO, fb: IO) => IO; /** * ```haskell * apSecond :: Apply f => f b -> f a -> f b * ``` * * Combine two effectful actions, keeping only the result of the second * * @category Apply * @since 1.0.0 */ export declare const apSecond: (fb: IO) => (fa: IO) => IO; /** * ```haskell * mapBoth_ :: Apply f => (f a, f b, ((a, b) -> c)) -> f c * ``` * * Applies both `IO`s and maps their results with function `f` * * @category Apply * @since 1.0.0 */ export declare const mapBoth_: (fa: IO, fb: IO, f: (a: A, b: B) => C) => IO; /** * ```haskell * mapBoth :: Apply f => (f b, ((a, b) -> c)) -> f a -> f c * ``` * * Applies both `IO`s and maps their results with function `f` * * @category Apply * @since 1.0.0 */ export declare const mapBoth: (fb: IO, f: (a: A, b: B) => C) => (fa: IO) => IO; /** * ```haskell * lift2 :: Apply f => (a -> b -> c) -> f a -> f b -> f c * ``` * * Lifts a binary function to actions * * @category Apply * @since 1.0.0 */ export declare const liftA2: (f: (a: A) => (b: B) => C) => (fa: IO) => (fb: IO) => IO; /** * ```haskell * apS :: (Apply f, Nominal n) => * (n n3, f c) * -> f ({ n1: a, n2: b, ... }) * -> f ({ n1: a, n2: b, n3: c }) * ``` * * A pipeable version of `sequenceS` * * @category Apply * @since 1.0.0 */ export declare const apS: ( name: Exclude, fb: IO ) => (fa: IO) => IO<{ [K in N | keyof A]: K extends keyof A ? A[K] : B }>; export declare const Apply: P.Apply<[URI], V>; //# sourceMappingURL=apply.d.ts.map