Marek Kubiczek
08/24/2023, 3:11 PMfun foo(block: (bar: Bar) -> Unit)
Is there a way to have
suspend fun coFoo(block: suspend (bar:Bar) -> Unit)
that could internally use somehow the non suspending foo
function to avoid code duplication?Sam
08/24/2023, 3:14 PMfoo
an inline functionSam
08/24/2023, 3:14 PMblock
will be allowed to suspend when foo
is called from a suspend functionMarek Kubiczek
08/24/2023, 3:46 PM