Skip to content

mapFirst

mapFirst<A, C>(f): <B>(data) => These<C, B>

Defined in: Core/These.ts:104

Transforms the first value, leaving the second unchanged.

A

C

(a) => C

<B>(data) => These<C, B>

pipe(These.make.first(5), These.mapFirst(n => n * 2));           // First(10)
pipe(These.make.both(5, "warn"), These.mapFirst(n => n * 2));    // Both(10, "warn")
pipe(These.make.second("warn"), These.mapFirst(n => n * 2));     // Second("warn")