Robert Menke
07/20/2019, 4:05 PMR? to Either<L, R>? Something like
fun <L, R> R?.toEither(f: () -> L): Either<L, R> {
return Option
.fromNullable(this)
.toEither(f)
}Imran/Malic
07/20/2019, 4:39 PMright()
this turns an A to an Either<Nothing, A>Imran/Malic
07/20/2019, 4:41 PMf function you would use `rightIfNotNull`:
B?.rightIfNotNull(default: () -> A): Either<A, B>pakoito
07/20/2019, 4:49 PMRobert Menke
07/20/2019, 4:50 PM