/** * Similar to `flatMap`, but ignores the constructed output. * * @tsplus static Either.Aspects tap * @tsplus pipeable Either tap */ export function tap(f: (a: A) => Either) { return (self: Either): Either => self.flatMap((a) => f(a).map(() => a)) }