Dirk
08/18/2022, 3:36 PMsimon.vergauwen
08/18/2022, 3:58 PMsuspend marker should've probably been added there.
In the proposal for Arrow 2.0 it's either inline or will support suspend.
You can for now just copy the method, and turn it into a custom extension function that has the suspend marker.simon.vergauwen
08/18/2022, 4:00 PMsuspend fun <R> EffectScope<R>.ensure(condition: Boolean, shift: suspend () -> R): Unit =
if (condition) Unit else shift(shift())Dirk
08/19/2022, 2:02 PM