toEither<B> method

Either<B, A> toEither<B>(
  1. B ifNone()
)

Implementation

Either<B, A> toEither<B>(B ifNone()) => fold(() => left(ifNone()), (a) => right(a));