/** * "Peeks" at the success of transactional effect. * * @tsplus static effect/core/stm/STM.Aspects tap * @tsplus pipeable effect/core/stm/STM tap */ export function tap(f: (a: A) => STM) { return (self: STM): STM => self.flatMap((a: A) => f(a).map(() => a)) }