/** * Use `E => E1` to transform `Either` to `Either` * * @tsplus static Either.Aspects mapLeft * @tsplus pipeable Either mapLeft */ export function mapLeft(f: (e: E) => E1) { return (self: Either): Either => self.isLeft() ? Either.left(f(self.left)) : self }