/** * Zips this together with the specified result using the combination * functions. * * @tsplus static effect/core/io/Exit.Aspects zipWith * @tsplus pipeable effect/core/io/Exit zipWith */ export function zipWith( that: Exit, f: (a: A, b: B) => C, g: (e: Cause, e1: Cause) => Cause ) { return (self: Exit): Exit => { switch (self._tag) { case "Failure": { switch (that._tag) { case "Success": { return self } case "Failure": { return Exit.failCause(g(self.cause, that.cause)) } } } case "Success": { switch (that._tag) { case "Success": { return Exit.succeed(f(self.value, that.value)) } case "Failure": { return that } } } } } }