toEither<L> method

Either<L, A> toEither<L>(
  1. L leftValue
)

Consider that None is a Left and Some is a Right(a)

Implementation

Either<L, A> toEither<L>(L leftValue) =>
    fold(() => Left<L, A>(leftValue), (A a) => Right<L, A>(a));