toEither<L> method
Implementation
Either<L, T> toEither<L>({L? l, L Function()? get}) {
assert((l != null) ^ (get != null));
get ??= () => l!;
return visit<Either<L, T>>(
just: (v) => Right<L, T>(v),
none: () => Left<L, T>(get!()),
);
}