swap method

IOEither<R, L> swap()

Change this IOEither from IOEither<L, R> to IOEither<R, L>.

Implementation

IOEither<R, L> swap() => IOEither(() => run().match(Right.new, Left.new));