April 2017
Intermediate to advanced
316 pages
9h 33m
English
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)") }
Read now
Unlock full access