bimap<C, D> method
Define two functions to change both the Left and Right value of the Either.
Same as map
+mapLeft
but for both Left and Right
(map
is only to change Right, while mapLeft
is only to change Left).
Implementation
Either<C, D> bimap<C, D>(C Function(L l) mLeft, D Function(R b) mRight) =>
mapLeft(mLeft).map(mRight);