Function
mapError_
(self: These<E0, A>, f: (a: E0) => E)
Source from the content-addressed store, hash-verified
| 70 | } |
| 71 | |
| 72 | export function mapError_<E0, E, A>(self: These<E0, A>, f: (a: E0) => E): These<E, A> { |
| 73 | return foldM_( |
| 74 | self, |
| 75 | (a) => succeed(a), |
| 76 | (a, e) => warn(a, f(e)), |
| 77 | (e) => fail(f(e)), |
| 78 | ) |
| 79 | } |
| 80 | |
| 81 | export function mapError<E0, E>(f: (a: E0) => E): <A>(self: These<E0, A>) => These<E, A> { |
| 82 | return (self) => mapError_(self, f) |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…