bimap<C, D> method

IOEither<C, D> bimap<C, D>(
  1. C mLeft(
    1. L a
    ),
  2. D mRight(
    1. R b
    )
)

Define two functions to change both the Left and Right value of the IOEither.

Same as map+mapLeft but for both Left and Right (map is only to change Right, while mapLeft is only to change Left).

Implementation

IOEither<C, D> bimap<C, D>(C Function(L a) mLeft, D Function(R b) mRight) =>
    mapLeft(mLeft).map(mRight);