Transform the error channel of a Result. Success values pass through untouched. Useful for translating low-level errors into domain errors.
Dual API — works data-first or curried for use in pipe.
pipe
pipe( parseOrder(raw), Result.mapError(e => ({ code: "BAD_ORDER", cause: e })), ) Copy
pipe( parseOrder(raw), Result.mapError(e => ({ code: "BAD_ORDER", cause: e })), )
Transform the error channel of a Result. Success values pass through untouched. Useful for translating low-level errors into domain errors.
Dual API — works data-first or curried for use in
pipe.