than_
07/17/2019, 2:23 PMinline fun <T> performTransaction(crossinline block: Transaction.() -> Try<T>): Try<T> =
transaction {
val result = block()
if (result.isFailure())
rollback()
else
commit()
result
}
This works well, but If I wanted to change the signature to
inline fun <F,T>performTransaction(crossinline block: Transaction.() -> Kind<F,T>): Kind<F, T>
I'm unable to test for isFailure(). Is there a good way about this?