chainFirst<C> method

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

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

Implementation

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