MCPcopy
hub / github.com/Effect-TS/effect / zipWith

Function zipWith

packages/typeclass/src/SemiApplicative.ts:35–53  ·  view source on GitHub ↗
(F: SemiApplicative<F>)

Source from the content-addressed store, hash-verified

33 * @since 0.24.0
34 */
35export const zipWith = <F extends TypeLambda>(F: SemiApplicative<F>): {
36 <R2, O2, E2, B, A, C>(
37 that: Kind<F, R2, O2, E2, B>,
38 f: (a: A, b: B) => C
39 ): <R1, O1, E1>(self: Kind<F, R1, O1, E1, A>) => Kind<F, R1 & R2, O2 | O1, E2 | E1, C>
40 <R1, O1, E1, A, R2, O2, E2, B, C>(
41 self: Kind<F, R1, O1, E1, A>,
42 that: Kind<F, R2, O2, E2, B>,
43 f: (a: A, b: B) => C
44 ): Kind<F, R1 & R2, O1 | O2, E1 | E2, C>
45} =>
46 dual(
47 3,
48 <R1, O1, E1, A, R2, O2, E2, B, C>(
49 self: Kind<F, R1, O1, E1, A>,
50 that: Kind<F, R2, O2, E2, B>,
51 f: (a: A, b: B) => C
52 ): Kind<F, R1 & R2, O1 | O2, E1 | E2, C> => F.map(F.product(self, that), ([a, b]) => f(a, b))
53 )
54
55/**
56 * @since 0.24.0

Callers 15

apFunction · 0.85
zipLeftFunction · 0.85
zipRightFunction · 0.85
lift2Function · 0.85
Effect.tsFile · 0.85
Micro.tsFile · 0.85
Array.tsFile · 0.85
Iterable.tsFile · 0.85
Option.tsFile · 0.85
lift2Function · 0.85
Chunk.tsFile · 0.85
Either.tsFile · 0.85

Calls 2

mapMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected