tap method

Either<L, R> tap(
  1. void f(
    1. R right
    )
)

Runs f with the Right value, if present, and returns this Either.

Implementation

Either<L, R> tap(void Function(R right) f) {
  if (isRight()) {
    f(getRight());
  }

  return this;
}