/** * Adds an effect to consumption of every element of the stream. * * @tsplus static effect/core/stream/Stream.Aspects tap * @tsplus pipeable effect/core/stream/Stream tap */ export function tap( f: (a: A) => Effect ) { return (self: Stream): Stream => self.mapEffect((a) => f(a).as(a)) }