effect-io-ai

Package: effect
Module: Effect

Effect.ap

Applies the function produced by one effect to the value produced by another effect.

Details

This function combines two effects:

Once both effects complete successfully, the function is applied to the value, resulting in an effect that produces a value of type B.

Signature

declare const ap: { <A, E2, R2>(that: Effect<A, E2, R2>): <B, R, E>(self: Effect<(a: A) => B, E, R>) => Effect<B, E | E2, R | R2>; <A, B, E, R, E2, R2>(self: Effect<(a: A) => B, E, R>, that: Effect<A, E2, R2>): Effect<B, E | E2, R | R2>; }

Source

Since v2.0.0