/** * "Peeks" at the error of the transactional effect. * * @tsplus static effect/core/stm/STM.Aspects tapError * @tsplus pipeable effect/core/stm/STM tapError */ export function tapError(f: (e: E) => STM) { return (self: STM): STM => self.foldSTM( (e) => f(e) > STM.fail(e), STM.succeed ) }