import type * as P from "@principia/prelude"; import type { LazyPromise, 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: LazyPromise<(a: A) => B>, fa: LazyPromise) => LazyPromise; /** * ```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: LazyPromise) => (fab: LazyPromise<(a: A) => B>) => LazyPromise; /** * ```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: LazyPromise, fb: LazyPromise) => LazyPromise; /** * ```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: LazyPromise) => (fa: LazyPromise) => LazyPromise; /** * ```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: LazyPromise, fb: LazyPromise) => LazyPromise; /** * ```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: LazyPromise) => (fa: LazyPromise) => LazyPromise; /** * ```haskell * liftA2 :: 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: LazyPromise) => (fb: LazyPromise) => LazyPromise; /** * ```haskell * mapBoth_ :: Apply f => (f a, f b, ((a, b) -> c)) -> f c * ``` * * Applies both `LazyPromise`s and maps their results with function `f` * * @category Apply * @since 1.0.0 */ export declare const mapBoth_: ( fa: LazyPromise, fb: LazyPromise, f: (a: A, b: B) => C ) => LazyPromise; /** * ```haskell * mapBoth :: Apply f => (f b, ((a, b) -> c)) -> f a -> f c * ``` * * Applies both `LazyPromise`s and maps their results with function `f` * * @category Apply * @since 1.0.0 */ export declare const mapBoth: ( fb: LazyPromise, f: (a: A, b: B) => C ) => (fa: LazyPromise) => LazyPromise; /** * ```haskell * apSeq_ :: Apply f => (f (a -> b), f a) -> f b * ``` * * Sequentially apply a function to an argument under a type constructor. For a parallel version, see `ap_` * * @category Apply * @since 1.0.0 */ export declare const apSeq_: (fab: LazyPromise<(a: A) => B>, fa: LazyPromise) => LazyPromise; /** * ```haskell * apSeq :: Apply f => f a -> f (a -> b) -> f b * ``` * * Sequentially apply a function to an argument under a type constructor. For a parallel version, see `ap` * * @category Apply * @since 1.0.0 */ export declare const apSeq: (fa: LazyPromise) => (fab: LazyPromise<(a: A) => B>) => LazyPromise; /** * ```haskell * apFirstSeq_ :: Apply f => (f a, f b) -> f a * ``` * * Sequentially combine two effectful actions, keeping only the result of the first. For a parallel version, see `apFirst_` * * @category Uncurried Apply * @since 1.0.0 */ export declare const apFirstSeq_: (fa: LazyPromise, fb: LazyPromise) => LazyPromise; /** * ```haskell * apFirst :: Apply f => f b -> f a -> f a * ``` * * Sequentially combine two effectful actions, keeping only the result of the first. For a parallel version, see `apFirst` * * @category Apply * @since 1.0.0 */ export declare const apFirstSeq: (fb: LazyPromise) => (fa: LazyPromise) => LazyPromise; /** * ```haskell * apSecondSeq_ :: Apply f => (f a, f b) -> f b * ``` * * Sequentially combine two effectful actions, keeping only the result of the second. For a parallel version, see `apSecond_` * * @category Apply * @since 1.0.0 */ export declare const apSecondSeq_: (fa: LazyPromise, fb: LazyPromise) => LazyPromise; /** * ```haskell * apSecondSeq :: Apply f => f b -> f a -> f b * ``` * * Sequentially combine two effectful actions, keeping only the result of the second. For a parallel version, see `apSecond` * * @category Apply * @since 1.0.0 */ export declare const apSecondSeq: (fb: LazyPromise) => (fa: LazyPromise) => LazyPromise; /** * ```haskell * mapBothSeq_ :: Apply f => (f a, f b, ((a, b) -> c)) -> f c * ``` * * Sequentially applies both `LazyPromise`s and maps their results with function `f`. For a parallel version, see `mapBoth_` * * @category Apply * @since 1.0.0 */ export declare const mapBothSeq_: ( fa: LazyPromise, fb: LazyPromise, f: (a: A, b: B) => C ) => LazyPromise; /** * ```haskell * mapBoth :: Apply f => (f b, ((a, b) -> c)) -> f a -> f c * ``` * * Sequentially applies both `LazyPromise`s and maps their results with function `f`. For a parallel version, see `mapBoth` * * @category Apply * @since 1.0.0 */ export declare const mapBothSeq: ( fb: LazyPromise, f: (a: A, b: B) => C ) => (fa: LazyPromise) => LazyPromise; /** * ```haskell * liftA2Seq :: Apply f => (a -> b -> c) -> f a -> f b -> f c * ``` * * Lifts a binary function to actions. `LazyPromise`s will be evaluated sequentially. For a parallel version, see `lift2` * * @category Apply * @since 1.0.0 */ export declare const liftA2Seq: ( f: (a: A) => (b: B) => C ) => (fa: LazyPromise) => (fb: LazyPromise) => LazyPromise; export declare const ApplyPar: P.Apply<[URI], V>; export declare const ApplySeq: P.Apply<[URI], V>; //# sourceMappingURL=apply.d.ts.map