/** * Folds an `AssociativeIdentity` through an `Either`. * * @tsplus static Either.Aspects foldMap * @tsplus pipeable Either foldMap */ export function foldMap(I: AssociativeIdentity, f: (a: A) => M) { return (self: Either): M => self.isLeft() ? I.identity : f(self.right) }