doOnEither<L, R> function

StreamEither<L, R> Function(StreamEither<L, R> either$) doOnEither<L, R>({
  1. required void left(
    1. L
    ),
  2. required void right(
    1. R
    ),
})

Implementation

StreamEither<L, R> Function(
  StreamEither<L, R> either$,
) doOnEither<L, R>({
  required void Function(L) left,
  required void Function(R) right,
}) =>
    (either$) => either$.doOnData(
          (event) => switch (event) {
            Left(value: final value) => left(value),
            Right(value: final value) => right(value)
          },
        );