pakoito
01/29/2020, 8:59 PMHiosdra
01/29/2020, 9:04 PMpakoito
01/29/2020, 9:07 PMaballano
01/30/2020, 10:34 AMpakoito
01/30/2020, 11:37 AMtoIO
and toIOException
to distiguish IO<Throwable, A>
and IO<Nothing, A>
for examplepakoito
01/30/2020, 11:37 AMHiosdra
01/30/2020, 12:12 PMfun <A> Either<Throwable, A>.toIO(): IO<Nothing, A>
to toIOException
Also to create and test:
fun <E, A> Either<E, A>.toIO(): IO<E, A> =
fold({ IO.raiseError(it) }, { IO.just(it) })
pakoito
01/30/2020, 12:12 PMpakoito
01/30/2020, 12:13 PMpakoito
01/30/2020, 12:14 PMpakoito
01/30/2020, 12:14 PMHiosdra
01/30/2020, 12:15 PMpakoito
01/30/2020, 12:15 PMfun <E, A> Either<Throwable, A>.toIO(f: (Throwable) -> E): IO<E, A>
pakoito
01/30/2020, 12:16 PMHiosdra
01/30/2020, 10:12 PM