Capture list: how does { x } differ from { [x] in }?
Task
var x = 1
let a = { print("a:", x) }
let b = { [x] in print("b:", x) }
x = 2
a()
b()
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep