Attempting to change dictionary values in a lambda function and then expecting the updated values at the caller level.
let test = { (header: [String: Int]) -> Void in
header.updateValue(header["width"]! * 10, forKey: "width")
header.updateValue(header["height"]! * 10, forKey: "height")
}
test(header: ["width": 10, "height": 2])
print(header["width"]) // expecting 100
print(header["height"]) // expecting 20
Problem: It still shows 10 and 2 at the caller level.