Skip to content

mapBoth

mapBoth<A, C, B, D>(onFirst, onSecond): (data) => These<C, D>

Defined in: Core/These.ts:139

Transforms both the first and second values independently.

A

C

B

D

(a) => C

(b) => D

(data): These<C, D>

These<A, B>

These<C, D>

pipe(
  These.both(5, "warn"),
  These.mapBoth(n => n * 2, e => e.toUpperCase())
); // Both(10, "WARN")