resource

fun <A> resource(acquire: suspend () -> A, release: suspend (A, ExitCase) -> Unit): Resource<A>(source)
fun <A> resource(action: suspend ResourceScope.() -> A): Resource<A>(source)