Fred Friis
03/04/2024, 9:55 PMdave08
03/05/2024, 5:30 AMLaurent Thiebaud
03/05/2024, 8:17 AM.map()
functions in Arrow ?raulraja
03/05/2024, 9:08 AMraulraja
03/05/2024, 9:08 AMbind
or flatMap
like in the snippet above.raulraja
03/05/2024, 9:13 AMeither
block.Alejandro Serrano.Mena
03/05/2024, 9:13 AMfun <A> Either<Throwable, A>.toResult() = Result<A> = either { this.bind() }
fun <A> Result<A>.toEither(): Either<Throwable, A> = result { this.bind() }
the general pattern is that the outer block (`either`/`result`) tells you the result type, and bind()
"injects" an error into the contextraulraja
03/05/2024, 9:14 AMFred Friis
03/06/2024, 1:52 AM