Alexander Levin
06/14/2021, 3:09 PMMyType.foo.bar.every.baz.modify(obj) { someSuspendFun(it) }
than_
06/14/2021, 3:42 PMmodify
would have to be inline
. But I have a feeling @simon.vergauwen could have some some near future good news regarding this topic 🙂simon.vergauwen
06/17/2021, 10:02 AMinterface
cannot contain any inline
functions (this is because there no code to inline, since it's dispatched to a runtime implementation).simon.vergauwen
06/17/2021, 10:09 AMinline fun <S, A> Lens<S, A>.modifySuspend(source: S, f: (A) -> A): S {
val focus = get(source)
f(focus)
return set(source, focus)
}
This could be solved by moving to class
, and revering the current hierarchy to not use inheritance for auto-conversion between optics.simon.vergauwen
06/17/2021, 10:09 AMAlexander Levin
06/24/2021, 7:45 PM