swap<L, R> function
Swaps the Left and Right type values.
expect(swap(right(123)), equals(left(123)));
expect(swap(left('hi')), equals(right('hi')));
Implementation
Either<R, L> swap<L, R>(Either<L, R> either) => either._fold(right, left);