A value-binding pattern binds matched values to variable or constant names. The following example presents the value binding pattern by binding x to 5 and y to 7:
let position = (5, 7)
switch position {
case let (x, y): print("x:(x), y:(y)")
}
A value-binding pattern binds matched values to variable or constant names. The following example presents the value binding pattern by binding x to 5 and y to 7:
let position = (5, 7)
switch position {
case let (x, y): print("x:(x), y:(y)")
}