map method

  1. @override
Either<L, R> map({
  1. required MapCallback<L> onLeft,
  2. required MapCallback<R> onRight,
})
override

Return the 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

@override
Either<L, R> map({
  required MapCallback<L> onLeft,
  required MapCallback<R> onRight,
}) =>
    Left<L, R>(onLeft(value));