is there a more idomatic way of doing something li...
# strikt
e
is there a more idomatic way of doing something like this:
Copy code
fun <T> T.assertIsSuccessful(
    dataAssertion: (Assertion.Builder<T>.() -> Unit)? = null
): T = expectThat(this)
    // removed for brevity
    .and { dataAssertion?.invoke(this) ?: assert(true) } // this ?
    .also { data -> dataAssertion?.invoke(data) } // or this?
    .subject
or is there a better way than either of those two?