toEither<L> method

Either<L, R> toEither<L>(
  1. L onLeft()
)

Implementation

Either<L, R> toEither<L>(L Function() onLeft) => switch (this) {
      Some(value: final value) => Right(value),
      None() => Left(onLeft()),
    };