Build an Either from Option.
Return Right when Option is Some, otherwise Left containing the result of calling onLeft.
onLeft
Either<L, T> toEither<L>(L Function() onLeft) => match( () => Left(onLeft()), Right.new, );