Skip to content

bimap

bimap<E, F, A, B>(onErr, onOk): (data) => These<F, B>

Defined in: Core/These.ts:132

Transforms both the error and success values independently.

E

F

A

B

(e) => F

(a) => B

(data): These<F, B>

These<E, A>

These<F, B>

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