chainFirst<C> method

  1. @override
Either<L, R> chainFirst<C>(
  1. covariant Either<L, C> chain(
    1. R b
    )
)
override

Chain a request that returns another Either, execute it, ignore the result, and return the same value as the current Either.

Implementation

@override
Either<L, R> chainFirst<C>(
  covariant Either<L, C> Function(R b) chain,
) =>
    flatMap((b) => chain(b).map((c) => b).orElse((l) => right(b)));