/** * Executes the specified `Either` if it is a `Right`, otherwise executes * `onLeft`. * * @tsplus static Either.Aspects catchAll * @tsplus pipeable Either catchAll */ export function catchAll(onLeft: (e: E) => Either) { return (self: Either): Either => self.isLeft() ? onLeft(self.left) : self }