mapEither method

Stream<Either<L, R>> mapEither({
  1. required MapCallback<L> onLeft,
  2. required MapCallback<R> onRight,
})

Return the Stream Either result in one of these functions.

if the result is an Left, it will be returned in onLeft, if it is a Right it will be returned in onRight.

Implementation

Stream<Either<L, R>> mapEither({
  required MapCallback<L> onLeft,
  required MapCallback<R> onRight,
}) =>
    map((Either<L, R> either) =>
        either.map(onLeft: onLeft, onRight: onRight));