Suggested approach: This is an advanced language question and comes down to one thing: if you pass a closure as a function parameter and that closure might be called after the function has returned (e.g. after a delay), it must be marked as escaping.
For bonus points, talk about why Swift uses non-escaping closures by default – they remove a small performance hit caused by Swift needing to keep escaping closures alive in memory after the function finishes.
Estimated difficulty: Intermediate
targetEnvironment()compiler condition do?
Link copied to your pasteboard.