One pattern that seems to be popular is to use closures to keep cause and effect code close to each other in the source, so that it’s easier to link them mentally. Even though they’re not necessarily executed close to each other in terms of real-time.
E.g. Timers: Timers are a way or getting a specific bit of code executed at a specific time (as in wall-clock time). The classic way of doing this was via a callback function - so you define the code you wanted executed at that future time in a function (or method) and pass a reference to that function to a timer object. The timer would then invoke that function at the appropriate time.
Because the code to be executed was in a separate function is was necessarily distant (in the source file) from the code that would cause it to be invoked.
Closures allow you to define that function directly as an argument when instantiating the timer so you can see inline what the timer will do when triggered.
This is also applicable to Notifications, network requests and other asynchronous events.