Stylianos Gakis
05/03/2023, 8:36 AMpublic suspend fun <B> Option<B>.bind(shift: () -> R): B
but with the new Raise scope nothing exists.
My use case was that I was basically doing
someList.firstOrNone { it.someCheck }.bind { ErrorType }
and there was nothing that the IDE could help me with, it was simply red in this case.
I’ll simply move over to using firstOrNull and deal with the null type with a simple ensureNotNull
instead of getting an Option in the first place, but just thought I’d let you know of this edge case. Not sure if you want to have things to cover all cases, so just writing this here so you know 😊simon.vergauwen
05/03/2023, 9:04 AMbind { }
has been replaced by getOrElse { }
, after I started working on https://github.com/arrow-kt/rewrite-arrow I kind-of abandoned that script.simon.vergauwen
05/03/2023, 9:05 AMRaiseRefactor
recipe yet 🤔 I've been extremely busy in the two weeks after KotlinConf 🤕Stylianos Gakis
05/03/2023, 10:10 AM