I hadn’t considered that writing block right next to suspend could be confusing! It’s an interesting and very valid point. I think it’s very important to reduce opportunities for that kind of confusion when presenting code examples, so I’ll certainly consider changing this one. I’m tempted to go with something like builder
or windowBuilder
—I’ll give it some thought.
I also appreciate you pointing out that this might be the first time we’ve used a suspending lambda function as an argument to another function. I glossed over this code pretty quickly, since it’s mostly just there to simplify and enable the following code examples, but I agree, a quick note about that might be useful. Suspending lambdas are an important feature, after all.
Thank you for the feedback!