Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftretain cycles and capture listsSingle-choice MCQ

What does this code print, given that `report` is declared with a capture list?

class Tracker { var value = 10 func makeReporter() -> () -> Int { return { [value] in value } } } let t = Tracker() let report = t.makeReporter() t.value = 99 print(report())