orangy
I don't understand the side-effects issues you mentioned.when evaluating hierarchy you have to execute lambdas, so that you get nested “describe” calls, and since they are just lambdas, they could establish some shared state:
describe(“a") {
val db = connect()
describe(“b”) { … use db … }
describe(“c”) { … use db … }
}
As soon as you execute describe(“a”), you get “db” captured in lambdas for b & c, which keeps connection, etc