toEither

inline fun <A, B> B?.toEither(left: () -> A): Either<A, B>(source)

Lifts a nullable value into an Either, similar to toOption. Must supply the left side of the Either.


Transforms a Result<T> into an ErrorOr<T>