/** * "Peeks" at both sides of an transactional effect. * * @tsplus static effect/core/stm/STM.Aspects tapBoth * @tsplus pipeable effect/core/stm/STM tapBoth */ export function tapBoth( f: (e: E) => STM, g: (a: A) => STM ) { return (self: STM): STM => self.foldSTM( (e) => f(e) > STM.fail(e), (a) => g(a).as(a) ) }